Archived

This topic is now archived and is closed to further replies.

a timing / frame rate question..

This topic is 5813 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

in general, what would people say was the better solution for making an application appear to function nearly identically on computers of varying ability? 1) Scale movement / rotation by a factor determined by the frame rate? This leads to "lurching" if the frame rate alters suddenly (and causes various other problems at low rates). 2) Force a movement / rotation update to only occur every 25th of a second (or something along those lines) regardless of framerate (with the problem that if a frame takes longer to render than 1/25 second the entire application slows down)

Share this post


Link to post
Share on other sites
Not much experience, but I think it is important here that you know your audience. It you''re sure that 99% has PC''s that (widely) meet the minimum system specs for your app, than you can choose for the last method. Otherwise, I think I''d choose for the first one.

Share this post


Link to post
Share on other sites
The best way to do it is to seperate your system into two parts. One part updates your system based on a variable length of time having passed, the other part draws your system at it''s current state.

The difficulty is trying to make a game operate identitically under differing frame rates. If your updates are fast enough (and yuor drawing is the part slowing your down), you can just break the time increment down into short (like 5ms) increments and update multiple times to avoid having arbitrarily long time slices in your update path. The problem with long time slices is that collision detection, AI, etc. all become less trivial when your time slice grows.

Share this post


Link to post
Share on other sites