Day 11: Enemy Behaviours, Shields, Credits


Development time: 2.5 hours

I added 4 different enemy behaviours.  To call them AI would be too much of a compliment, they're pretty dumb.  I thought about having them follow preset paths (like waves of enemies in Galaga) but after thinking about how much time I wanted to put into the enemies I settled on these movements.

I didn't like that after the player died they could be thrown into a bad situation with an asteroid right on top of them, so I added a shield.  First the shield was added to the gameObject.png sprite sheet, and the dimensions added to sheetOptions.  Then a new collision filter was created since I wanted the shield to collide with the same things as the ship but not with the ship itself.  After playing with the sheild for a while I settled on a 9 second fade out, which would give the player time to clear the area around the ship before it disappeared.  The collision detection code was modified to account for the shield.

I added a new scene scenes/gameAbout.lua for the game credits and added a button to the menu that takes the player to the credits screen.

Next: Day 12

Get Asteroid Blasteroid

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.