Project runs differently upon restart

Woah this project speaks for itself…

One of the bugs mentioned is that when you restart a project, the code runs differently. It seems to be a global variable that is changed, and I think it would be great to try to isolate it, I just wanted to share this project first.

(I think not everything is a bug — e.g. copying and pasting between projects doesn’t work but that is more by design)


Well it kinda isn’t amazing because it’s a bug but…

That’s amazing… (I’ve seen that bug before but that is amazing!!!)


Hi @t1_hopscotch I played with it a bit and I think I was able to isolate the issue.

When the project is played it’s not immediately starting at 60 fps. It takes a second or so to get there. When the project is restarted it starts at or gets to 60 fps sooner.

When the game starts, Robo starts moving. If it hasn’t touched “lol” within 100 ms then then variable “Text” (which controls what text you see) is not changed. Since the fps starts slower the first time, it doesn’t touch. When the fps restarts faster, it does touch.

Add a object as a fps meter and you’ll see that on the first start the meter reads ~30 just for the first second, then it goes up to ~60 as expected. On a restart, the first reading from the meter is already at ~60 fps

We need to see what the project version is. It’s 2am here, so I don’t quite feel like going over to the pc to download & look at the project json to get the version…


Wow that’s interesting :thinking::open_mouth:

Is the project version the key named ‘version’ in the JSON? It says that it is 26, I am not quite sure what that means. (I used the Python program that I had, to download the JSON from the project URL) And that’s quite understandable!


@Liza @Rodrigo @AwesomeOnion @t1_hopscotch

I just checked the latest beta (Hopscotch Version 37, Player Version cb43565) and this issue is still present. Projects start at around 30 FPS and take a second to get up to 60 FPS. If restarted, they start at 60 FPS which causes projects to behave differently if a Wait block was used in a When Game Starts event.

See t1’s original post for an example project that demonstrates the effects of the bug.

See my post above for an explanation of the example project bug