Skip to content

Testbed for various game loop and timestep methods.

Notifications You must be signed in to change notification settings

Nikaoto/love2d-gameloop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

love2d-gameloop

Times taken for the player to reach the end of the ruler. In other words, the player, moving at a constant speed of 10 pixels per second, took this much game time to cover a distance of 66 pixels:

.. vsync novsync & dynthrot novsync & stathrot novsync & simpdynthrot
.. 6.64569 6.63680 6.63416 6.6385
.. 6.64745 6.63504 6.63669 6.64532
.. 6.64496 6.64029 6.63644 6.64029
avg 6.64603 6.63504 6.63576 6.64137
diff 0 0.01099 0.01026 0.00466

This still needs more testing. I will expand on each table entry with explanations after I have tested them thoroughly in actual games. When we don't have vsync the novsync & simpdynthrot method works best and is what's implemented in src/engine/runtime.lua. The same method works when vsync is on, the throttling simply won't happen since the desired fps is not being exceeded.

  • Use v key to toggle vsync
  • Use r key to toggle slow rendering simulation
  • Use u key to toggle fast rendering simulation
  • Play with globals declared in src/main.lua

Resources:

About

Testbed for various game loop and timestep methods.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages