April’s Program: Star Dodge
Try not to burn up as you move your spaceship between the stars.
Late and last-minute, I present April’s program of the month Star Dodge. A decidedly simple game that requires you to dodge stars randomly placed on the screen. Can you get your Tie Fighter shaped ship, an inverse H, past the increasingly more dense stars? Give it a try to see.
Star Dodge doesn’t really do anything new, but it does a good job of tying different ideas together. If you’ve been following along, you’ve probably see most of the concepts in other programs. I used loops to display the stars and walk the fighter up the screen. You’ve seen movement test before and you've seen the test for a hit used as well. Overall, nothing is new. It is now I put it all together that is different.
About that, Star Dodge does surprisingly well. The concept is simple and effective. The movement is fast and fluid and sufficiently difficult, while not impossible. By creating the star field, using the ZX81’s FAST
mode, I removed most of the delay in the random placement logic from the game play. By changing up the overall mechanics, Star Dodge takes common tasks and make them work well. This is a good example of efficient programming: using common algorithms in different ways to solve a problem. In this case, it was probably more accidental at 14. However, reuse has been a staple of my programming style ever since. Perhaps all that programming at a young age was helpful after all.
If you want to run this program on your Android phone or tablet you can download a compressed copy of the program to your device. You’ll need to save the .p version of the program to your device to allow Zed Ex (Beta) to run it.