Android game with constant FPS?
Asked Answered
B

4

8

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?

Basically answered 18/2, 2010 at 10:54 Comment(0)
S
13

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.

Syncopation answered 18/2, 2010 at 10:58 Comment(0)
G
6

There's another treatment of the topic here:

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

Gyve answered 19/2, 2010 at 15:50 Comment(0)
P
3

I notice the other answers address that a game loop should be implemented, in the sense that you should always render your graphics/updates with respect to time offset in milliseconds rather than 'frames', which is true.

I found this page in an attempt to see if there were recommendations on ideal Adnroid framerates, but after Googling around, I'm not finding any facts about optimal FPS usage. Not to say there aren't some 'magic' numbers which are ideal for certain Android chipsets or anything like that. It's just that if there are, it's not a very significant enough point to be well known I suppose.

That said, I'll share my thoughts on ideal Android framerate after not finding any hard and fast answers, for anyone else wondering the same thing I did:

The ideal framerate is as small as possible without compromising user experience. The reason is that the more frames that are rendered per second, the more CPU cycles are used, the more battery is consumed. Certain games (e.g. Chess) don't have as much going on as a fast paced 'endless runner' game for example.

Starting from a low number and increasing the framerate until the user experience feels good is probably a good indicator. It's something one should be able to adjust right near the end of app development prior to release.

Panegyric answered 11/4, 2015 at 0:57 Comment(1)
"The ideal framerate is as small as possible without compromising user experience" - exactly the words of wisdom I needed. Thanks a lot!Buffybuford

© 2022 - 2024 — McMap. All rights reserved.