Skip to content
Werner Stoop edited this page Dec 26, 2013 · 3 revisions

The core of Rengine runs as a finite state machine.

A State is simply one of the modes that the game can be. Examples of different states you may find in a typical game are:

  • The Title screen.
  • The Main Menu screen.
  • The first level.
  • The second level, third level, fourth level and so on.
  • The victory screen, when you win the game.
  • The game over screen, when you lose.

States have transitions between them. That is, the game can go from state to state depending on the player's choices, or on the game designer's. Examples of transitions include:

  • Going from the Title screen to the Main menu screen after 2 seconds,
  • Going from the Main Menu to the first level when the player chooses the "New Game" option.
  • Going from the first level to the second level when the user wins the level.
  • Going from the second level to the Game Over screen if the player loses all his lives.
  • Going from the Game Over screen back to the Main Menu screen when the player clicks a button.

The state machine is defined in the game.ini configuration file.

Clone this wiki locally