A lot of updates recently, but most of it is behind the scenes.

I’ve cleaned the code up a lot. I’m using ES6 modules to separate things and I’ve created some config files and helper classes for some of the really ugly code. Specifically the UI helper classes mean I’m not hard coding pixel values for all of the UI elements anymore. The elements are relatively positioned and based on screen size now, which means I can move things around and resize elements and everything else falls into place.

I’ve also added basic support for multiple screens (or “scenes”, as they are called in Phaser). Now there are simple loading, title menu, and endgame scenes. The phaser docs are a little confusing in this area, so I don’t know if I’m managing the scenes quite right, but it’s good enough for now.

Loading Screen

Endgame

And the latest change that I’m most proud of is support for multiple waves of zombies, with spawn rate determined by an easing function. Originally zombies spawned at a fixed rate. I noticed as I fiddled with this rate the game was either too easy and I killed all the zombies at the top of the screen, or too hard and the mob steadily made its way down to the bottom. I wanted to make it so the flow varied. This helps to create tension as the horde grows and shrinks. And it means that a few zombies can get through without an immediate flood of zombies following right after. The easing function allows the zombies to trickle in at the beginning of the wave, build up to some max flow rate, and then trickle down at the end of the wave. Hopefully this feels more natural.

Zombie Waves

I’m doing my best to follow a process and keep my Trello board up to date to stay focused.

Trello