RetroChallenge #2, part 2. Easier than it seemed.
Well, yesterday I spent a few hours coding the “Hippo Teeth” game, and I was surprised at how easy it all seemed to flow.
After saving the background image as a BIN file, that could be LOADM’d from the main program, I went ahead with creating and animating the “Sprites”.
The player’s controlled Doc can be in just 3 positions, one below each tooth. So I used a variable P to track those. As the graphic of the player is made up of 5 lines of 3 graphic characters each, I also use P$(5) to store the 5 strings. Then another array P(3,5) to store where each of the 5 strings should be printer for each of the 3 possible positions.
That is, when the player is in the 2nd position, I print P$(1) at P(2,1); P$(2) at P(2,2); P$(3) at P(2,3) and so on.
I did the same with the Worm and the Tongue, but for the Smoke, it was a bit more complicated, since it can be in located in a 3×4 grid.
Actually, my first problem was that the game was running too fast!
Each teeth has 40 “life points”, and I was subtracting one for every loop that the worm was under a specific tooth. I had to cut that down to 0.25 for each loop, which actually gives the teeth a life of 160 points.
I made a single change to the game play.
In the original, the tongue could move to “cover” the worm, and stood there, blocking your shoots, while the worm ate the tooth.
Now, if you shoot a “clean” tooth, the tongue may move to that position, leaving the worm open for a shoot.
So far, the game is taking 2570 bytes of memory, and I realized that I’m using some commands that are not in “standard” BASIC (STRING$, TIMER).
I will need to figure out if the game will target a 4 KB machine with tape, or a 16 KB one with Extended BASIC / Disk BASIC.
If I go for the 16 KB machine, I can make some extra animations, and with Extended BASIC, probably nicer sound.
Here is a video of the game after under 3 days of work, with sounds mostly as “placeholders”
And yes, I need to figure out why sometime the smoke cloud is not deleted…