Tower Defense Prototype – Update #1



This is the first update for my Tower Defense Prototype! (Title Pending)

These past two weeks have mostly been dedicated to expanding on what came before, with a new mutant type and 2 new items to use. I’ve also taken the time to improve the UI and background, to make the game look more cohesive.

There are still a lot of code additions, of course. The main new feature here is Object Pooling. As there can be a lot of pickups and projectiles at once, spawning and destroying new ones each time would end up a lot less efficient than it could be. So, I needed a way to not use up as much memory on this. So, I coded an object pooling system which organises objects and then deactivates/reactivates them as needed, only spawning new objects if there are currently none available to reactivate. This has greatly optimised the game and will ensure in the future that there will be less optimisation troubles.

Otherwise, the new sniper item attacks the mutant furthest to the left for big damage, and the double shooter attacks twice for double the damage. The new mole mutant digs under the field for 3 tiles before emerging, staying immune to attacks while it’s underground.

I hope to make additions to the visuals and audio before the next update. This will make the game feel a lot more alive and provide better feedback to the player on their gameplay.

Thanks for reading! Below is some of the new code I’ve written for the prototype in the last fortnight.