XNA Creators Club Online
Page 1 of 1 (9 items)
Sort Posts: Previous Next

need help with gameStateManagement sample

Last post 10/07/2009 18:29 by crabby. 8 replies.
  • 10/07/2009 10:15

    need help with gameStateManagement sample

    Can someone explain this to me section by section cause I can't make sense of most of it. I understand the ScreenManager bit and how it works ,but I don't get anything after that :S . I really apreciate any constructive input :).

    PS: Sorry if I posted in a wrong section, I wasn't sure which one I shoud post to
    If your game isn't broken - it doesn't have enough features yet :)
    digitaldevilgames.wordpress.com
  • 10/07/2009 11:22 In reply to

    Re: need help with gameStateManagement sample

    This section is fine.

    Which part do you need help with? If you know C# it's laid out very logically. Essentially, you don't really need to care about how it works, but how you can make use of it.

    With GSM you break up all of your game into "screens". For example, you usually have a main menu screen, a game screen, and a pause screen. These are included with GSM. If you need more screens then you can easily create your own by creating a new class file, having it inherit from GameScreen, and overriding it's LoadContent, Update and Draw methods. If you've only used the default game template in XNA, think of each "screen" as your own little self-contained Game that you can use for anything.

    Also, nice signature. ;-)
    "No programmer can pick up a TV remote without thinking what it would take to add a stun gun. [...] Their motto is 'if it ain't broke, it doesn't have enough features yet'" - Scott Adams, The Dilbert Principle

    The signature that was too big for the 512 char limit
  • 10/07/2009 12:55 In reply to

    Re: need help with gameStateManagement sample

    Thanks for that!

    I also found a secluded article of disection of the "GSM" which took a load of my mind :)

    Here it is for anyone else that has the problem: www.freewebs.com/campelmxna/Articles/ArticleGame.rtf
    If your game isn't broken - it doesn't have enough features yet :)
    digitaldevilgames.wordpress.com
  • 10/07/2009 13:00 In reply to

    Re: need help with gameStateManagement sample

    Also incase you didn't see it there is an .htm document that comes with the sample.
    Game hobbyist hell-bent on coding a diabolical Matrix
  • 10/07/2009 13:06 In reply to

    Re: need help with gameStateManagement sample

    Craig Martin:
    Also incase you didn't see it there is an .htm document that comes with the sample.


    The .htm file in the sample tells you how to use it in your game while I want to fully understand it and build my own version. (I want to use my original code only :P)

    and also: are you allowed to use the sample code in your game?
    If your game isn't broken - it doesn't have enough features yet :)
    digitaldevilgames.wordpress.com
  • 10/07/2009 13:52 In reply to

    Re: need help with gameStateManagement sample

    Sh4d0wR1d3r:
    I want to fully understand it and build my own version. (I want to use my original code only :P)


    There are a number of subtleties with the sample that only become apparent after some use. It might be a good idea to use it for awhile and replace it bit by bit with your code. For me that would be the fastest way to understand it. But everyone learns in different ways ;)


    Sh4d0wR1d3r:
    also: are you allowed to use the sample code in your game?


    I believe so.
    Game hobbyist hell-bent on coding a diabolical Matrix
  • 10/07/2009 13:52 In reply to

    Re: need help with gameStateManagement sample

    Sh4d0wR1d3r:
    The .htm file in the sample tells you how to use it in your game while I want to fully understand it and build my own version. (I want to use my original code only :P)

    Why?

    I've made my own version of this many times in other programming languages, and I had started one for XNA/C# but it ended up looking a lot like ScreenManager. The advantage of ScreenManager is that it's already debugged and finished, so I can spend more time on my games instead of needlessly reinventing the wheel.

    Sh4d0wR1d3r:
    and also: are you allowed to use the sample code in your game?

    We're not allowed to answer legal questions on these forums so you'll have to look at the accompanying license. However, I will say that I have two games on XBLIG that use NetworkStateManagement. :-)
    "No programmer can pick up a TV remote without thinking what it would take to add a stun gun. [...] Their motto is 'if it ain't broke, it doesn't have enough features yet'" - Scott Adams, The Dilbert Principle

    The signature that was too big for the 512 char limit
  • 10/07/2009 14:05 In reply to

    Re: need help with gameStateManagement sample

    well... that settles it, I'll just modify the menu system then :) as long as I don't get into any trouble
    If your game isn't broken - it doesn't have enough features yet :)
    digitaldevilgames.wordpress.com
  • 10/07/2009 18:29 In reply to

    Re: need help with gameStateManagement sample

    Since you're so interested in learning (and I assume improving) the game state management example, Shawn has been posting recently on stuff he's been adding to it like menu sounds, using components locally to a gameplay screen instead of the entire game. He's blogged about it in the past, so you might find those posts helpful in understanding it.

    http://blogs.msdn.com/shawnhar/
Page 1 of 1 (9 items) Previous Next
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG