You’ve Got Your Gamestate Management Sample In My Platformer

I tweeted about this earlier, but the update is a bit too much for a tweet. I added a couple of versions to the merged Platformer/Gamestate Management sample that I did as a result of a question on the AppHub forums. Here are all the relevant links:

Bare bones merged version – link

+ lives – link

+ scrolling level – link

+ power-ups – link

+ moving tiles – link

7 Comments

  1. Dave Hunt says:

    Love the title! Hopefully this will cut down on one of the most commonly asked XNA questions on the forums.

  2. CKurt says:

    I have been working in XNA for a few months now and was looking for more concrete examples using the Game State Managment.

    Although I don’t get the feeling this is really tight integration. Just bare-bones and then adding features to it. I would like to see a ‘saving’ option and how the settings set in the option screen could be used.

    How to communicate between the different screens should be added, altough this sample is very nice in it’s simplicity.

    Also it doesn’t use any GameComponent (except the screenmanager) and calls updates and draws manually. I’m wondering if the code could be simplified by maken use of Gamecomponents.

    I’m also wondering why the Game State Managment example does not use DrawableGameComponents and just let the Screenmanager manage adding them to the Game.Components list and setting the Enable and Visible properties correct.

  3. Tipx says:

    I know this is not a new post anymore, but I’d like to ask you something that fits in the mindframe of the post, imho : Let say you’d want the platformer to ask the player, when the level ends, what he’d want to do with his crystals. He could buy a life, or give them to charity for example. Would you add a flag to the base level class for something like “hasAPopupOpen” then handle it from there with the detection of where the player clicks, etc.; or would you try to make a new Screen for the ScreenManager to handle and find a way to pass back the player’s action to the level?

  4. Badger says:

    I am really interested in how this works (have been trying to get the PSK to work in a menu system for quite some time now) and your links work, but the files DONT WORK!!!! I try opening them in Visual C# 2008 Express and it says “Unrecognized project. No adapter available.” please help

  5. James says:

    I noticed that when time runs out, the lives do not decrement. I can for the life of me fix this.

  6. GianCarlo says:

    can you make a 3.0 version for me??? please… I really need it for my game project….

Leave a Reply