[email protected]
[Top] [All Lists]

Re: [SDL] Framerate independence? (Koen Witters)

Subject: Re: [SDL] Framerate independence? Koen Witters
From: "Patricia Curtis"
Date: Tue, 27 Mar 2007 19:54:59 +0700
Hi Koen and all
       Yeah i agree , and its a great write up, like you i have met many programmers and concepts of game loops. one thing that your article does not mention GameStates. I have found that some people choose to make a complete new game loop for Intro and another one for in the game and yet more for other game events. for me i feel that its not necessary when you only need a game state int,
#define GAME_STATE_INTRO   1
#define GAME_STATE_PLAY    2
#define GAME_STATE_FOOBAR 99999
int GameState;
In the main loop i usually have various switch statements deciding what to display or functionality to use, the benefits for me are that At any point in any of the functions you can simply change GameState to a new state and the next time through the loop it will be in a different game mode.
Sorry for the ramble but i thought i would be worth a mention in your write up.
SDL mailing list
[email protected]
<Prev in Thread] Current Thread [Next in Thread>
  • Re: [SDL] Framerate independence? (Koen Witters), Patricia Curtis <=