Game Loop

Can someone explain me how the gameloop works? How perfomant is it?

I see that it has something to do with the requestTick method which is called every time the calculations for a frame are finished, right before the tickEnd method.

Thanks 
Basically the engine calls draw and update methods for each certain time (1 frame). There will be some complicated alghorithm to calculate time for each frame to maintain the FPS.

https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
fpsmeter.js contains multiple calls to requestAnimationFrame and this part: "maxFps:60".


It's minified, though, so good look trying to understand what it does ^^
..It's minified, though, so good look trying to understand what it does ^^
The Mv Demo game's files - all of them - were also minified... Its not a hard thing to reverse
And even if they actually are minified, the first line is:

/*! FPSMeter 0.3.1 - 9th May 2013 | https://github.com/Darsain/fpsmeter */Going here. You find this:

https://raw.githubusercontent.com/darsain/fpsmeter/master/src/fpsmeter.js

But yes, the fps meter handles your frame rate...
Thanks to everyone. This has helped a lot!

Original thread: https://forums.rpgmakerweb.com/threads/game-loop.48251/