Jump to content

  • Log In with Google      Sign In   
  • Create Account

TheBlackDeath

Member Since 08 Sep 2012
Offline Last Active Dec 02 2012 09:29 PM

Topics I've Started

Managing a linear campaign with game states

11 September 2012 - 10:53 AM

I'm using a LIFO stack for keeping track of the game state, where each state is a class inherited from an abstract state class. This is the first time I'm designing a single-player "campaign" for a game (FPS style), so I was wondering if my intuition on how to do it is correct.

I was thinking to have a "level" state, which is an abstract class, and to create a child class for each different level (and perhaps the child class also inherits the game state class, I'll figure that out once I get to coding).

So the flow of the game states would look something like this:
Enter menu state
Push game state
Push first level state
Pop first level state
Push second level state
Pop second level state
// etc...
Pop game state
Pop menu state

I know that this will work, but how is this compared to, for example, how a AAA game would manage a campaign?

[C++] Ethereal Chess - 3D OpenGL With AI Interaction

08 September 2012 - 08:36 PM

Never mind.

PARTNERS