Game: Appstates and management

Started by
1 comment, last by Cygon 11 years, 8 months ago
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.
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.

Learn to make games with my SDL 2 Tutorials

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.
Professional C++ and .NET developer trying to break into indie game development.
Follow my progress: http://blog.nuclex-games.com/ or Twitter - Topics: Ogre3D, Blender, game architecture tips & code snippets.

This topic is closed to new replies.

Advertisement