The game has actually been finished and published on Xbox Indie Games (Under the name Argh Aliens link -> http://marketplace.xbox.com/
Monday, 5 March 2012
It's so easy to fall behind
The game has actually been finished and published on Xbox Indie Games (Under the name Argh Aliens link -> http://marketplace.xbox.com/
Tuesday, 7 February 2012
Refactor
I've been through the code base and had a bit of a tidy up.
There is now a static class which holds all of the controls for the player, this is really useful as it maps an xbox pad button reference to a key so I don't have to keep remembering which key I assumed would be the start button!
I've also removed all game variables (like start lives, score multipliers. Etc) from the classes that use them as there was too much duplication and find and replace. Now there is a singleton options class that can be used to get option settings. Why isn't it a static class? Because I want to be able to set the values in the options if need be and static would fix them.
Another change is the camera and lights are now part of a scene object that is passed into the level.
Player objects are also now created at game state and passed into the level. This means I don't have to track player variables outside the level for when the next level is created. It makes sense as the state of a player exists across multiple levels.
It needs some nicer graphics too. I'll try my best!
Oh and an xbox trial mode!
Adding some incentives
So now you can collect fuel power ups to top your fuel up and also if you score over a certain number then you get an extra life!
Friday, 20 January 2012
Creating state and screens
So far the game has loaded, jumped straight into the action and on completing a level just jumped straight back to playing.
I need to have some sort of naturally flowing state to the game such as...
Start page
Playing game
Level complete page
Game over page
And probably a Game paused page
This will allow the user to naturally flow through the main states of the game and provide input into what happens. Such as start or quit the game, pause play, see how well they did on a level or review how well they did at game over.
I've already got my enum to let me know what state my playing game is so I've added more states to this to represent these extra sections.
All I need to do is have some screens displayed to the user with a way of choosing options.
I've created a base Game screen class that draws a background image on screen and You can also provide it an array of menu choices which get rendered to screen. The default class also allows navigation and selecting menu items.
Now for each game state that requires a screen, I just extend this base class and add any custom functions such as displaying the end of level score or letting the user start a game.
There are much better state systems for XNA but this one is very easy to implement and serves my needs just fine.
Now my game has a nice flow of states.
Splash: check for user input to determine controlling game pad.
Main menu: can start the game, view controls or quit game.
Playing: game play mode
Paused: game froze, can also quit to main menu
Level complete: show score break down
Game over: show final score
Quit confirm: any time the user wants to quit just get them to confirm it.