Hopscotch Comments not taking a frame in Check If

A feature I’d like to see in Hopscotch is:

I’d use it for this type of project:

Projects that need some explaining

Here are some examples of Hopscotch code that could be improved if we had this: Less time when running projects

Here is an example design I’ve made:

(none needed)

I’ve seen something similar in another programming languages, it looks like this:

In Scratch comments is just an addon to the screen that does not do any change to the real code.


Comments in hopscotch are equivalent to 1 frame, or 1 wait(0) block.


Comments are ignored in code, and, therefore, don’t take any frames to run.

Or is the bug back? :eyes:


Currently they execute instantly like other instant blocks. Do you have a project illustrating extra frame delay?

I will post a demo project here.


If you have more than one instantaneous block at the beginning of the loop, only the first one is run on frame zero. Everything else is run on the next frame


It might actually be related to how 2+ variables in containers take an extra frame to run, even though they’re both instant blocks.

I know it makes no sense knowing comments are completely ignored unlike set variable blocks.


What about in repeat blocks?


Repeat blocks take a minimum of 1 frame no matter what


The empty repeat block will take 5 frames to execute

I made a project here. So in the base object, I have an empty Repeat container x 90. Then I put some blocks in it and see how long they take to run.

When there are two comment blocks or Set variable blocks inside (both are instant blocks), the Repeat container still takes 90 frames.

When there are two Set position blocks, each take 1 frame, so the Repeat container is finished after 180 frames.


The behaviour with containers may have been changed to fix this bug, where variable values were incorrect/inconsistent


Ok. It must be because i put set variable then comment


The repeat block in hopscotch is different to the one in scratch.

like Awesome_E said, it takes 1 frame to loop no matter what.


I had an example with Set Variable & comment there — both the blocks take 0 frames.

But in a Repeat, it will take 1 frame for each loop at a minimum, no matter what blocks are in there. So those blocks are still 0 frames in there.


There might be some cases with instant blocks in “Check once if” containers that I haven’t tested much yet though. Would need to investigate for that.


Already did that.

I named it weirdly because I always have crashes every 1 minute. [1]

The left is slower (30 times per second) despite only having a comment and set variable block in the conditional container.

With the way containers are ran currently, this is totally normal. [2]

  1. also because I had no idea what to name it ↩︎

  2. platformers are harder to create because of this. We would be an alternative method to compensate ↩︎


Thanks for posting that — I can confirm that example, with the Check once if container

1 Like

This is also the reason that I have input lag on the calculator project. On 1.5.x, there was no issue with input lag

1 Like

I feel like one of the only ways to compensate for this would be to allow custom methods to run without screen refresh (instantly, basically like how Scratch does it). Not sure how hard this would be, though, especially since most blocks are unable to run instantly in its current form.