views:

636

answers:

3

Hi,

I'm implementing a game loop with constant FPS. I'm thinking about 25-30 FPS should be enough. Any ideas from your own experience? Should I even restrict FPS at all?

Thanks in advance!

+5  A: 

30 to 40 fps is usually good for a fast paced game. Depending on the game and how heavy it is, the platform might not be able to always keep up. It is therefore better to assume that the game can't follow the fps accurately. Instead keep a timer that checks the system clock each frame and figures how much time has elapsed. This way you can calculate the increments to for example physics (an object falling) correctly, even if the game is running at a lower fps.

Marius
Thank for quick answer!
sinec
+2  A: 

A good start for game loop : http://wiki.igda.org/Programming_and_Technology/Game_Programming_Patterns_for_Beginners/Game_Loop

david
great link, thanks!
sinec
+1  A: 

There's another treatment of the topic here:

http://dewitters.koonsolo.com/gameloop.html

Rod Hyde