webgl-playground icon indicating copy to clipboard operation
webgl-playground copied to clipboard

Keyboard/mouse interaction causes update with incorrect delta time

Open loop54-christoffer opened this issue 1 year ago • 3 comments

I was making a game with this framework and noticed something odd: in-game time seemed to speed up when I was interacting with the mouse or keyboard, even if the interaction was just holding the mouse button down and moving around the mouse on the screen.

I don't know enough Elm to troubleshoot it, but just to try it out, I switched from reading the computer.time.delta field, to computing the delta manually from consecutive reads of computer.time.now. I think this has solved the problem, but I don't really know how to reproduce unambiguously.

loop54-christoffer avatar Mar 18 '23 20:03 loop54-christoffer