Open exjam opened 10 years ago
Unfortunately, the browser stops rendering (and thus stops updating) stuff while the browser is not focused. Might need to add some code that when tab is in background we switch to setInterval to keep ticks running at a slower but effective rate (without rendering).
Probably because we use requestAnimationFrame for loop?
This is indeed the case. In fact, we should probably be doing some form of CCD when frame-times are long. Note that the code is written to be able to handle long frame-times which pass through transitions between states and such, but the code doesn't use it particularly well.
Go run for a long distance and change browser tab, wait a bit, return to rosebrowser tab and discover that the whole screen is grey!! (So probably fallen through the floor).