FPS hit 100+! HOW!

1 sentence description of the problem (I was doing _________, and then __________ happened): I was coding my diep.io tanks project when the fps suddenly reached 100+!

Steps that the Hopscotch team can take to reproduce my problem every time:

  1. Play this project https://c.gethopscotch.com/p/12pmqytzvn
  2. Switch until you get flank guard, then shoot bullets

I expected this to happen: the fps to stay under 60

But instead this happened: 100+ FPS!

Here’s a sweet screenshot/video:

Your username: HappyCoder​:smiley::ukraine:

What kind of device are you using?: (Also include iOS version, and Hopscotch version) 5th generation apple ipad, ios 15.7, player 2.12 hopscotch version 3.54.2


it’s more “tap the play button, then you have a small little change having doubled fps”. it’s a pretty known bug, simply exit and reenter and youre good

btw, that flank guard is so cute :D


Thanks, just added Octo tank and Quad Tank, Tri-Angle will be hard though


Is their a 60 fps cap on HS? If their isn’t then wouldn’t this be a good thing?


my favorite tank hehe

its really a cap for most devices, not hopscotch- idk if there is one that can go over that, but if there is, then yeah i guess it is a good thing. but the fps probably isn’t actually 107- just a visual thing, id assume.


I think that’s a duplicate of this topic:

@Octo-Pi Let me know if this is a consistent way to reproduce because your method to reproduce doesn’t work. (Reproduction steps have to happen every time – having it happen once doesn’t mean those steps can be taken every time to make the bug happen again)

(no need to press play button at first, just do step 2, which is to tap edit button while HS shows a white screen with loading animation)


Same, I play with it on diep.io!


Very common glitch. Some of us have made code to compensate for the extra speed. After the glitch occurs, the FPS could reach up to 120, which is obviously not normal nor stable.


Yea, all u have to do is make everything go at a speed relative to the fps be that the average 60 or 120


More specifically, tap the play/edit button rapidly until you get a more distinct white flash.

1 Like

I just thought of something.

Maybe, and I could very well be wrong, when the glitch occurs, maybe that causes the RequestAnimationFrame to be executed twice per frame instead of only one per frame. Now, I have no idea how RequestAnimationFrame works other than it makes looping functions run at 60 FPS, so it might not be the actual cause of the higher frame rate glitch.


That is definitely what is happening. The old loop is probably not stopped correctly, and when you press play, a new one is created.

Here’s the steps to reproduce – it makes sense if you think about it


Huh??? And you got it on an old(ish) iPad? Huh? What? Wha? I don’t get it! Also, uh yeah bump!


Some users have experienced a glitch were rapidly tapping the play button or going into edit mode while the project is still loading and playing it again causes everything in the project to run twice per frame until the user exits the project entirely.


Huh, interesting.


clive please! @SilverSong