Gorgi Kakasevski Posted August 11, 2016 Share Posted August 11, 2016 Hi everyone. Although I found many articles about game loop, requestAnimationFrame, delta time etc. I want to ask you here what is the best way to implement it. As a "game loop" I understand the code which should execute several times per second non-stop, even if a user switch between the tabs in the browser. I found this library https://github.com/kittykatattack/smoothie, in which you can specify your frame rate which is independent from requestAnimationFrame, but update() function stops when user switch between tabs. Any help, recommendation, or a plugin for best solution? p.s. Simple example will be great. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.