Trouble with Maze Game collisions in Sprite Lab

Creating a maze game in Sprite Lab, but the “when touches” block doesn’t work correctly when the player touches the maze sprite. If the player spawns outside the boundary of the maze, it will reset each time it crosses the edge of the maze, even through an open path. If the player spawns inside the maze, it will ignore all collisions, allowing the player to walk straight to the goal.

It’s like Sprite Lab can’t handle a collision on the interior of a sprite, only with the outside boundary, even if it has transparent regions inside, like a maze sprite. Older maze project videos on YouTube seem to work, so I don’t know what’s wrong.

Any help will be much appreciated!

Code linked here.

Note: I created a simplified maze path for testing, but there is a full maze sprite if you scroll down to the bottom of the costumes.

@rdrew,

I believe that in both Sprite Lab and Game Lab, collisions can only be established between sprites. Transparency is considered part of the sprite, so even if the transparency is on the outside edge of a sprite, a collision will still occur between one sprite and transparency of another.

Mazes would have to be made up of multiple sprites that the character sprite could navigate between.

If anyone has any other thoughts, I would love to hear them.

Mike

Thanks for the reply! I looked back at the YouTube videos I had seen, and it looks like none of them actually have the collision working.

The outer boundary of a sprite appears to serve as the hit box in Sprite Lab, so a maze image won’t work here. I must have been thinking about a similar Scratch project I’ve done in another class.

1 Like