App States

Taggidy tag tag

SDL App States

Tim Jones    |     October 19th, 2011    |     28 comments
In this muchly desired side tutorial we are going to look at how to implement something most commonly called Game States (or as I call them, App States). This tutorial will be based upon the code from the SDL Collision Events tutorial.

To simply explain what an app state is, try to think of your game (or application) as a parent with many child applications. In other words, your primary application can yield control to a single child when needed.
SDL Tutorials
App States
Game States
RECENT TUTORIALS

First Foray into SDL/OpenGL

OpenGL handles the drawing of models in a window but it does not provide the window, or handle events; that is why SDL is required. The prime purpose of this tutorial is to set up the SDL window and events mechanism. It also sets up the OpenGL environment that uses the window, the game loop, and a rotating cube.

Huh? My Pong clone uses 100% CPU and is still slow?

Your program is being a CPU hog! In some cases, this situation can actually make your program run slowly! Your code needs to give some time back to the OS (i.e. delay or sleep).

Setting up MonoDevelop to run Tao

A new series from Stephen Jones demonstrating how to use C#, Mono, and Tao to develop SDL / OpenGL games.
Tag.