Flixel progress – part 3 flying space rocks

The next step that I took in learning and building my game with Flixel was to add some global properties for the game such as the number of lives the user has, the skill level (easy, medium, and hard) and ways of changing these settings. I have not gotten to build any menus for allowing the user to set the skill level yet so naturally by default the skill level is set to easy.

When the game launches I look at the global settings to see what “level” has loaded. In this case everyone starts at zero with a skill level of easy. This is important because I am going to be using these settings to create logic that will decide how many rocks to place on the screen for the user to blow up on any given level, so when the games sets up the level and chooses how many rocks to place the number is calculated with something like this… LEVEL * DIFFICULTY + 5. This way the game gets progressively harder. 

Also now that I have how many lives the user gets I can kill the ship when a rock hits it and if you notice deduct or kill one of the graphics of the ships in the upper left corner of the screen. I think it’s coming along pretty nicely.