AndrewNatoli/jsplatform — pull request #3 by kjlaw89 (2013-09-30 03:30:45+00:00)
Title: Updated functionality of Main Game Loop

Just a fun little update to this engine:
Updated Main Game Loop
- Added fixed time step (occurs at set intervals every second, good for
physics)
- Added frame limiter
- Added deltatime variable (useful for updating object permissions at a
constant rate per-second, helps make games perform the same when the FPS
differentiate between computers)

The FPS counter is based off of the draw time, with quite a few
roundings/maths going on between it, so it's not very accurate. It'd be
better to keep a variable and increment it during the draw() function,
then once a second has passed update the FPS counter. Far more accurate
that way.