i try to make a speedy game template, out of my iso-jumping example, but when i run around the platforms, the runspeed+run animation considerably slows down.
i have min & max frames at 60
Even if the fps meter should be write like : round(1/TimeDelta())
There is a strange number of frame added with your fps meter.
Idk how works the lifecycle of eventsheets, is the first frame of the game is a special frame?
It should be interesting to record the screen at 60fps and look which frame is too much, is it the first frame or the latest.
Maybe I’m totally wrong, I’m just asking why your meter is on 61.
Can you use the 1/TimeDelta() ? TimeDelta is a proper way based on the computed time of events. It more precise.
the max result is 62.5.
if i dont cap frames at 60 and leave it 0, i got framerates of over 66.
that could explain the speedup.
but why is the animationspeed so much higher, with only about a 4% increase in frames?
For clarification:
It looks like the animation speed is almost doubled/halved
Halved would make sense. Browsers/Electron enforce vsync. If you’re below the screen refresh rate, it halves the framerate until it’s back up to vsync.
From 30 back to 60 is doubled.
So I have to assume that the Brower jumps down to 30 when the game has to render the platforms.
Seems I can’t do anything about that then?
As far as I know there’s no way to force electron or browsers to disable vsync.
What I don’t get is how it’s long enough to be noticeable. Dropping down to half framerate for 1 frame out of 60 (0.016 seconds), should be barely perceivable.