Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android game with constant FPS?

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?

like image 616
sinek Avatar asked Feb 18 '10 10:02

sinek


2 Answers

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.

like image 125
Marius Avatar answered Sep 19 '22 11:09

Marius


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

like image 44
david Avatar answered Sep 17 '22 11:09

david