Is Snap glitched or something?

I have made a game called "Maze-Mania!" and on the actual code page, I've tested it and it works fine. But, when I actually view the project on the snap website, you can just go through the walls. What's going on? Does it have to do with the fact that I'm checking the barriers by color? Or is Snap just going crazy? I've tried restarting the tab, but that didn't seem to fix the problem either. Can someone tell me what I'm doing wrong?

Hi, welcome to the forum!

You have to share your project before the rest of us can see it.

Meanwhile, my guess without seeing it is that your walls are too thin, and the sprite is passing through before it notices that it's touching that color.

You need to use if-else blocks, like this:


as this bug only happens when two keys are pressed simultaneously.

As bh says, it's probably due to wall thickness.

Colour detection in Snap! is very fuzzy and only practically useful for large areas of the same colour

You can simulate what is happening in the code editor by reducing the size of stage and then you see how the sprite can't see the walls anymore.

One way to deal with this (if you want thin walls) is to create a separate maze sprite and detect touching that instead
image

Okay. Thanks so much!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.