[SDL] Game event loop and input
Owen.Butler at throughput.com.au
Thu Jan 30 17:15:00 PST 2003
I think this is more a general game programming question.
Try www.gamedev.net or www.flipcode.com.
Most importantly, try www.google.com.
Check out the developer diaries on www.pyrogon.com.
Check out the source to one/many of the many games listed on the libsdl
> -----Original Message-----
> From: sdl-admin at libsdl.org [mailto:sdl-admin at libsdl.org]On Behalf Of
> Joby Bednar
> Sent: Friday, 31 January 2003 11:43 AM
> To: sdl at libsdl.org
> Subject: [SDL] Game event loop and input
> *This message was transferred with a trial version of CommuniGate(tm) Pro*
> I'm starting to map out the various stages of my game, intro,
> tutorial, game play, cut scenes, etc. and it is getting a little
> ugly when it comes to what I envision as user input and the basic
> event loop. I'm thinking I need to create a global that stores
> the current game state and use a series of case statements within
> the PollEvent loop. This seems a bit bulky though and could run
> pages long.
> Has anyone had experience in developing a custom class that you
> can use to wrap around the event to simplify the event structure
> with respect to your game states? Or perhaps other ways that you
> have found especially effective in keeping code clean and simple?
> - Joby
> Give someone a program - frustrate them for a day.
> Teach them how to program - frustrate them for a lifetime.
> SDL mailing list
> SDL at libsdl.org
More information about the SDL