navi homePPSaboutscreenshotsdownloaddevelopmentforum

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#317 closed defect (fixed)

Limit framerate

Reported by: rgrieder Owned by: nobody
Priority: major Milestone: Version 0.3 Codename: Castor
Component: GeneralFramework Version: 0.2.0
Keywords: fps gui Cc:
Referenced By: References:


There is some code in the GameState for the dedicated server ( that controls the framerate.
That would also be very useful for the normal game mode. I suggest making configurable values for dedicated, GUI and server/client/standalone.
It is not only an enhancement but also a fix because on windows when having too much frames per second, the kernel calls raise to a very high level and thus slowing down the whole system considerably (especially in GUI mode).


  • Mind the timers that accumulate the time spent while ticking. It would not be very meaningful to add the waiting time to the tick time.
  • Calling the sleep function on Windows will suspend the process for at least a few (10 in my measurements) milliseconds because it is scheduler based.

Change History (3)

comment:1 Changed 11 years ago by rgrieder

  • Resolution set to fixed
  • Status changed from new to closed

Implemented in orxonox::Game by Oli plus some Windows-adjustments by me. Use [GameConfiguration].fpsLimit_ config value to adjust the framerate.

comment:2 Changed 11 years ago by landauf

Is it possible to deactivate the limit?

comment:3 Changed 11 years ago by rgrieder

fpsLimit_ = 1000000 and you'll never meet it ;)

Note: See TracTickets for help on using tickets.