|Subject:||Re: [SDL] Framerate independence? Koen Witters|
|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
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] http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
|<Prev in Thread]||Current Thread||[Next in Thread>|
|Previous by Date:||Re: [SDL] Framerate independence?, Andreas Schiffler|
|Next by Date:||Re: [SDL] Framerate independence?, Scott Harper|
|Previous by Thread:||Re: [SDL] Framerate independence?, Koen Witters|
|Next by Thread:||[SDL] SDL_net library maintanance, Ulrich Eckhardt|
|Indexes:||[Date] [Thread] [Top] [All Lists]|