Asteroids Plus 2.0 - Milestone 13, light housekeeping, spawning, HUD data, health/lives, progressive difficulty…


I started dabbling in peasy-lighting, and there are some kinks to work out before porting over into the game.  As I do, I created a separate project to play with that library.  We will pick that back up later.

So, the next thing on my list was the spawning routines.  Up to this point, I randomly loaded a bunch of asteroids into the entity queue and just spit them on the screen.  I cut that code out and added a spawning timer that will be coupled to the progressive difficulty setting…  the thinking here is that as you destroy asteroids and improve, the spawn rate will decrease over time. 

Also, instead of asteroids spawning in the middle of the viewport, I moved their spawn areas to the edges of the viewport, so they fly in from the sides.  This is all randomized.


This brings me to two new concepts, the experience gaining/leveling, and the score tracking.  The scoring and experience will be tracked to the game, and the values will be updated in the entities.  I need to export a function that lets the entities update the value in the game state.


I need to add to this method the check for leveling up.  For now, I will just level up every 100 experience points.  I did some playtesting with this, it’ll work for right now, but may need shored up in later playtesting for balance. I do need to increase the velocity of the bolts that are fired though.             

I think I will work on health and lives, and the restarting/spawning that occurs.  That wasn’t much different than managing the destruction of the asteroids…  but I do need a damage timer, when a collision occurs between the player and the asteroid, it needs to be come invincible for a short time.

This is a simple timer that counts down from 3 seconds after a collision that does damage.  During this time, no collisions or damage occurs.  What was happening to force this was a collision can happen every update, and you would lose a lot of health…. VERY QUICKLY.

I think the last thing for this entry is managing the Menu transition, right now its automatic.  I want to tie it to a UI event.  That wasn’t that bad, had to adjust for mobile and desktop on that.

I found a bug on mobile though, so we will need to work on that going forward.

Till next time…

This currently hosted game site: https://mookie4242.itch.io/asteroids-plus-20

Twitter: @jyoung424242

SlideShare: https://www.slideshare.net/JustinYoung3/next-gen-asteroids

GitHub: https://t.co/utxHxXKdOz

Leave a comment

Log in with itch.io to leave a comment.