Open PiMastah opened 8 years ago
Thank you! I knew I needed to add something like this but wasn't quite sure where to begin.
If you need help with integrating this, I would be happy to help you out. I quite like your game so far and think it has great potential :)
Most notably, when running S-TSiR in a background time, time passed does not equal time elapsed in game since setInterval only works as assumed in active tabs due to resource consideration.
However, requestAnimationFrame allows to evaluate the parameter passed to the callback in order to deduce time elapsed.
Take a look at the documentation and see if you would like to go down that route.
Documentation
Browser support
Code part