Jump to content
  • Advertisement
Sign in to follow this  
mistermonday

Game: Appstates and management

This topic is 2225 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello Everyone,
I recently began upon programming my first serious game and I ran upon an SDL tutorial on appstates. The only issue is, I don't want to use SDL. Could anyone inform me on how to create appstates and an appstate manager? I just need it to do the basic stuff: Play an initial animation saying who the game was made by----> hand control over to the main menu------> hand control over to the game or credits --------> hand control to an in game menu.

Share this post


Link to post
Share on other sites
Advertisement

Hello Everyone,
I recently began upon programming my first serious game and I ran upon an SDL tutorial on appstates. The only issue is, I don't want to use SDL. Could anyone inform me on how to create appstates and an appstate manager? I just need it to do the basic stuff: Play an initial animation saying who the game was made by----> hand control over to the main menu------> hand control over to the game or credits --------> hand control to an in game menu.


I used the same GameState class I used for my SDL game as I did for my OpenGL iPhone app. The way I did it, there was no SDL or OpenGL code in the management of the game states, only in the implementation of the individual game states.

Share this post


Link to post
Share on other sites
It's usually referred to as a "game state manager" - that at least will yield you several results on Google. Also see the related "state pattern".

I was in a similar situation with my last game but ultimately settled on writing my own when each and every example either tightly coupled the game states to a specific engine or library, or decided to hard-code it for one purpose.

If you can use it, I have published my code together with a small article showing how to avoid common design pitfalls here: Game State Management.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!