Recently added powerups to my shooter + endless runner game TheWedge
That is probably the last major gameplay feature. It was easier than I thought and even though my code is disorganized it is easy to sift through to determine what is happening where and to insert the powerup modifiers.
The powerups required 3 new UI components. The first is an "Announcement" that displays saying what powerup you picked up, the second is a "shield" indicator which I made as an animated border around the life bar and the 3rd is a countdown timer indicating which powerup is running and how much time left there is.
Since I already had code for a countdown timer for the player's life I could re-use that. I did my usual "make it work first, worry about maintenance later" method so if I add more "timer based" powerups I i'll have to refactor a bit but what I have works for now.
For balance I made the powerups appear roughly once a minute in what is usually a 3-4 minute game. When I play it the powerups certainly make the game easier but I assume I'm going to be playing my game more than any other player.
I had to force myself to stop at only 4 different kinds even though as I was making them all sorts of ideas for more came up.
Overall I'm pretty happy with the results. If anyone has questions about how I implemented anything in the game let me know and I can walk through the code with you.