Code: Select all
do while not done
- init_game_stuff(), typically, I will use SCREENRES to initialize the graphics, calls to FMOD, or SDL wrapper for sound, my own classes for timers, etc.
- get_inputs(), I write a class to collect information on key presses, mouse movement, joystick, etc
- update_game_state(), pure coding stuff, usually not dependent on platform/target
- update_sound(), calls to whatever sound lib I am using
- update_graphics(), typically, if using fbgfx, it is a CLS: draw_stuff(), SCREENSET, sleep(), action
- exit_game_stuff() is the clean-up code
The question is: Has anyone found, even if it is conditional, a game-loop, that works well on all platforms and fbgfx/opengl modes? I typically only test on win32, so if anyone has some experience across all platforms, I'd really like your advice. Thanks.