Whew, I finally fixed the attack wave code! A few days ago I realized it had become a bunch of spaghetti code and a bug explosion waiting to happen. So I decided to just dump the code I had and start over again. First I took out my notebook (a paper notebook, not a laptop) and started working out some kind of flowchart on how it should work and to my surprise, it took me less than an hour to come up with a working algoritm. It handles game startup and shutdown, tracking lives and score and, of course, sending waves of enemies towards the player. There will be two types of attack waves in the game. Type one is a swarm of enemies that keeps flying around and attacking until they are all destroyed. Type two is a continuous wave of enemies that come and go for a set amount of time.
So now that I finally got this up and running, I can continue working on buildings, player weapons and enemies. For the next version, I’m gonna create a storage tank (base building), a rocket launcher for the player and two new enemies. Another thing I’m gonna do is rebuilding the status display so it’s entirely sprite-based, wich should solve all problems about resizing and adapting to the screen resolution.