Hi everyone, this is my second Arduboy game.
I thought there aren’t enough tower defense games for the Arduboy, so I made one.
GitHub:
Play Online:
Features:
- 8 all different towers, most can rotate
- Every tower can be upgraded 3 times
- 5 enemy types that come in 6 different groups
- 3 different enemy races that behave all the same
- A fast playing mode
- A pathfinding algorithm for free tower placement
- An ingame tower and enemies lexicon to get some infos
- 20 campain maps to unlock
- Fancy menus with moving items and map previews
- An editor to create your own maps on 5 slots
- EEPROM support to save scores and maps
- A custom 6x5 pixels font
But gifs say more than many words and pictures:
Main Controls:
About the Game:
The towers and the graphics:
I think one reason why there are not many tower defense games on the Arduboy is, because it is really hard to fit many towers plus some enemies and game information on 128x64 pixels. I am really happy with the a bit unconventional 6x6 pixel graphics I chose. With some space right and some space at the bottom there is still space for 9x20 = 180 tiles. Every tower uses 4 tiles, this way they are distinguishable. At first I thought it would not be possible to make 24 towers rotatable without losing the different look of them, but I think it went really well.
The pathfinding:
I use a simple or not very intelligent Dijkstra-like pathfinding algorithm. It spreads from the target in every direction and writes the costs to a global array with all the map tiles. The path is only recalculated if the map changed. The enemies read from this array and every enemy decides then what its best path is. The enemies do not walk in tiles, they walk in pixels, this way they can walk vertical lines. I also added some randomness to the path, so if two paths are equally good the enemy group will maybe split.
The editor and the maps:
I needed a editor to create those maps. The maps where created on my “Arduboy” and than sent via serial and copied to the progmem. This way I could create a lot of maps in a short time. Than I liked the editor and addit it to the game. The maps are really compressed. A map consists of 180 tiles which can be free, rock, tree or headquarter, this means 2 bit pro tile. With a specific difficulty factor and a start coins value a map in total is only 180/4 + 2 = 47 bytes. It is my first time using the Arduboy EEPROM, maybe if someone could take a look over it, that would be nice.
The projectiles:
Those towers can rotate at 16 different directions, so one direction sector is 360°/16 = 22,5°. Because I use those sectors for the projectile movement it means the towers are shooting with a max direction error of ±10,5°. Sometimes especially if a enemy is moving many degrees it can happen that the projectiles misses. I just say to myself that this is more a feature than a bug, makes things more realistic…
The enemies:
The enemies of a race sometimes look really similar. Maybe some will remember that I already used a few of them in my first game (Micro Tank). But if you wanna know what tower is best for the next wave you can look at the icon in front of the waves count. There are three different enemy races to make the look of the game a bit more varied.
In the main folder of my repository there a two hex files. The one with the _DEBUG suffix has many already unlocked maps and it prints the frames pro second to the top left corner. I could not test my game on a arduboy, but it would be nice if someone could say how many frames the arduboy can do while playing or in main menu.
This is version 1.0 it is playable but maybe some fine tuning is necessary. I could spend another week changing some tower damages slightly up and down but I think it is time to release. Maybe there are still some bugs.
If you wanna help and feel a tower is too strong or to week or a map is to difficult or something else, please let me know. Also programming tips or advice, I appreciate every kind of feedback. The code is a mess but I used lots of comments, so anybody should have at least an idea what I did in most of the lines.
That’s it, I will answer any questions and I hope you have some fun playing