grimdoomer

ok so i have just started C# and C++ and i seam to be catching on prety quickly. I have been able to get many custom modles to move with sound and effects. But today i wanted to start an entire game. so I was woundering how would i go about making a main menu/ I hae not been able to find any tutorials on it.



Re: XNA Game Studio Express main menus for newbie

George Clingerman

Did you take a look at the SpaceWar starter kit They've implemented a fairly good menu there and it's a great example to look at.

I can't recall any community tutorials posted on how to make a Menu, but if you're loading models and moving them around and playing sounds, loading a Title screen with menu options on it isn't going to be much more difficult.

Basically, you're going to want a variable to track GameState and then based on that current GameState stored in that variable (so for example when the game loads, it holds "TitleScreen"), you draw the particular screen, effect, etc that you need to when that is the current state.

I've got a simple project showing how to do something like that for 2D games (the concept is going to be similar for 3D games) but I do not have any accompanying tutorials for the code at this time.

You can download the source from here.

Hopefully that helps get you started in the right direction.





Re: XNA Game Studio Express main menus for newbie

Darkside

Over @ corflower blue, Eli from Microsoft has a nice blog section on a game structure, nice class diagrams as well.

Suggest you check it out - http://blogs.msdn.com/etayrien/archive/2006/12/12/game-engine-structure.aspx






Re: XNA Game Studio Express main menus for newbie

Holm76

I have written a very simple GameState program too. Now this prototype doesnt implement a menu as Georges does but I use another technic to control the flow of the program. I place GameStates on a Stack and as states are instanciated they are pushed onto this stack. Whenever a stat is not needed it is popped off this stack. Its a really simple structure once you understand the code and it is very extendable.

Ive posted it in this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1039056&SiteID=1

In conjunction with Georges GameState project you'll be popping out full games in no time. :)





Re: XNA Game Studio Express main menus for newbie

KIWIDOGGIE

George Your my hero Thanks i will mention you in my game