I can never seem to open google drive links. It always asks me to login. So I have no input on your events.
As far as the physics stepping mode:
Variable will be frame rate independent but according to the box2d docs a fixed timestep is better since it makes things more consistent with the simulation. Realistically a variable timestep would only affect constraints such as joints and contacts. Canât imagine it would be bad for simply moving objects and applying forces.
Fixed will make the simulation more consistent but defaults to a timestep of 1/60. That means if you have a faster screen refresh rate the sim will run faster.
A solution would be to set the timestep to match the screen refresh rate. But I forget if the physics behavior even lets you change the timestep. If it doesnât then never mind what else I have to say. Thatâs kind of a blocker.
Browsers donât provide a way to get the screenâs refresh rate but you can guess it from the frame dt. A better guess would be to average multiple frame dts, maybe over one second. Ideally youâd want the game to be running with a low cpu/gpu load when sampling the frames so there is minimal frame skipping which would throw the average off. But it should be possible to statistically figure out that bigger dts refer to skipped frames but I digress.