game timing
Posted: Fri May 13, 2011 3:46 pm
Hi, I want to run one function at 30 times per second (game logic)
then I want to run another function at 60 times per second ( graphics)
But if the game is running slow, then I want to reduce the number of times graphics are drawn per second, so the logic can stay constant.
I can set up timers and callback functions but cant seem to work out how to do the rest.
then I want to run another function at 60 times per second ( graphics)
But if the game is running slow, then I want to reduce the number of times graphics are drawn per second, so the logic can stay constant.
I can set up timers and callback functions but cant seem to work out how to do the rest.