rosebrowser icon indicating copy to clipboard operation
rosebrowser copied to clipboard

Falling through the map when browser tab not focused.

Open exjam opened this issue 11 years ago • 3 comments

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).

exjam avatar Oct 04 '14 14:10 exjam

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).

brett19 avatar Oct 04 '14 18:10 brett19

Probably because we use requestAnimationFrame for loop?

exjam avatar Oct 20 '14 00:10 exjam

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.

brett19 avatar Oct 20 '14 01:10 brett19