A 2D Space Invaders-inspired shooter for Android in which you play as a soldier fighting back waves of aliens using different types of weapons. This project was originally a playground for learning new techniques, but later decided to apply the knowledge I'd gained to create a game utilizing these techniques.
The player could customize their soldier’s parts through the main menu. Each of these parts had stats, such as armor, firerate, etc, represented by a level. The level of each stat was decided at runtime based on the stats of other items of the same type through an algorithm.
Instantiating objects at runtime is very expensive, and since the core game loop was having enemies spawn in waves, I figured a pooling system was a reasonable way to deal with any performance issues.
This system would allow for reusing objects that were instantiated on startup, enabling them instead of instantiating them when needed. The pooling system allowed for multiple pools of objects of multiple types, and I used this system not only for the enemies, but for particle systems as well.
Instead of having to manually add item buttons to the customization panels as soon as I decided
to add a new item, I made a system that dynamically creates the items on startup under the appropriate panel.
This allowed for more flexibility, and eased the workflow throughout the development process.