I present to you my second Arduboy game - ‘Arcodia’.
A port of the classic ZX Spectrum game ‘Arcadia’.
#INSTRUCTIONS
Left = Move ship left
Right = Move ship right
A = Fire ships thrusters
B = Fire lasers
Each wave gives you a different enemy to beat. You have 60 seconds till the next wave. When you kill all enemies in the wave, another wave will appear until the 60 seconds are up.
On the next level you will be presented with a new enemy and another 60 seconds to beat it.
Each enemy looks different and moves in a completely different way from the last. Only by playing the game will you learn how each enemy moves.
There are 2 enemies to beat in total. After all 12 enemies have been beaten you will start again on enemy 1. However, this time you will have 1 more enemy in the wave and the movements of the enemy will be more violent and erratic.
This game is really down to the wire with memory usage so I had to take out fancy loading screens and cut out some of the animations too. However, the core game is unaffected.
Have fun!
Follow me on Twitter for news of my latest game developments.
Case statements will kill you. Anywhere you can changing them to array lookups will save a ton of space… for example with CheckLaserHit() for example instead of 12 case statements you should have a PROGMEM array with the all the offsets (including the ships with 0 offets) and then look into that array depending on the enemy and find the proper offsets to add.
You may not be able to do this for every case statement but if you think about it I bet many of them can be collapsed into behavior you could descirbe with numbers, not code… the more the code for all 12 enemies is similar and you pustthe differences down into the data the smaller your program will get.
Your collision checking should probably also be a function that you pass shapes to instead of inlined… so then all your hit functions would call the checkCollision function to return true/false rather than repeating that code 2-3 times.
The trick is to look at your code and see repeated patterns… anytime you see a repeated pattern or the same code more than one there is usually a smaller (and often better) way to write it.
Those are source code files and aren’t binary files. The only files you should be including for your game in the binaries section is a pre-compiled .hex file. If my memory serves me correctly, use the Sketch > Compile Binary option in the Arduino IDE to compile a .hex file that will be saved in the same directory as the .ino file.
Just downloaded this game and started playing it. It is super fun and the code looks interesting. Im hoping to learn from it to write my own vertical shooter.