crkellen / bands

A real-time online multiplayer CTF shooter game
GNU General Public License v3.0
5 stars 4 forks source link

Implement a server-sided dynamic framerate changer #85

Open crkellen opened 7 years ago

crkellen commented 7 years ago

Please fill out this Issue template to the best of your ability!

Type of Issue

Hint: Design Issues or Requests are changes to existing features, not new ones.

Description of the Issue:

Currently the framerate for the server logic loop is static at 30ms. Implement a dynamic framerate changer that lowers or raises the framerate depending on how long it takes for a frame (one loop) to execute.

Additional comments or information:

The client-side uses requestAnimationFrame for their renderloop, since no actual game logic is done in the renderLoop. This works well as it already attempts to sync it's framerate to the browser's refresh rate.