Commit Graph

13 Commits

Author SHA1 Message Date
Jeremy Rand
815758f3ff Rework the game logic to support one and two player games. 2021-01-20 00:06:32 -05:00
Jeremy Rand
384a9ea233 Make more globals per player and index into them with the player number at game time. 2021-01-10 23:17:05 -05:00
Jeremy Rand
3f0578d142 Fix the crashing bug when the previous game ends with the player colliding with the last remaining segment. 2020-12-26 00:31:54 -05:00
Jeremy Rand
32aee75462 Add the segment, spider and extra life sounds. Add some more information about the mysterious crash. 2020-12-18 00:50:01 -05:00
Jeremy Rand
7264cf907d Clamp mouse movement to a max of 8 pixels per frame. Add some code which will become the "refresh the mushrooms after death" implementation. 2020-11-24 22:59:08 -05:00
Jeremy Rand
bb66ef4b03 Replace the C code which built tables at game launch time with a script which generates these tables at build time. This reduces the start time of the application and saves code space and is a necessary step before adding some new tables to handle the mouse efficiently. 2020-11-04 22:48:18 -05:00
Jeremy Rand
0dd8222611 Add the code to handle restricting the spider to lower and lower rows as the score goes up. This is the final bit of game logic necessary for the bugs in the game I think. 2020-10-26 22:32:46 -04:00
Jeremy Rand
96a6b6f51f Implement the code to add the flea at the right time. This includes tracking the score in multiples of 20,000 and adjusting the number of mushrooms required in the infield before a flea will appear. Simplify the other score based thresholds which are based on multiples of 20,000 to use this test. Add debug which allows me to add 20,000 to the score whenever I want so I can test these thresholds more easily. 2020-10-25 23:11:11 -04:00
Jeremy Rand
1d4f783a3e Change the code for centipede speed to skip slow speed segments entirely once the score is more than 40000.
Add segments at the start of the next level in reverse order so the single head segments are added first.  This ensures they do collision detection properly in the updateSegment code.
Fix a bug where a set of 16 tiles were always marked as occupied by a centipede segment because we didn't clear it properly on each updateSegment call.  This fixed a problem with segments changing direction for no apparent reason.
Test for collisions on the two tiles the segment is spanning and change direction if either is occupied.  This should eliminate single segments travelling on top of each other.
Add scorpions randomly during a game once we get to level 4.  They are added with a 1 in 512 chance every 60 seconds so you should see a scorpion about once every 10 seconds or so.
When the score is above 20000, add scorpions at fast speed 3/4 of the time, slow speed the other 1/4 of the time.  Lower scores, the scorpion is always slow.
2020-10-23 00:20:18 -04:00
Jeremy Rand
1f26b38784 Fix the order of colours for the different levels. Remove the debug code to add centipedes and change the colour palette. This is gone now because we now have the concept of starting a game and progressing through levels with different kinds of centipedes running at different speeds with different palette colours. 2020-10-20 23:13:46 -04:00
Jeremy Rand
6c3b8398a8 Add the code to start a game and iterate through levels. We don't detect the end of a level yet though. 2020-10-19 23:34:08 -04:00
Jeremy Rand
04d2e74f15 Add the data about the different levels from a centipede segment perspective. 2020-10-17 16:36:12 -04:00
Jeremy Rand
b85000b4ed Start adding the infrastructure for levels and score. 2020-10-13 00:09:37 -04:00