I found lots of bugs!

This game proves a lot of bugs. First of all, some statements will only work as intended if used backwards, second, the tilemap will not update if it is going to be changed to a tilemap with the same asset as the one before. There are probably even more while you check this game.
@richard
@shakao
@darzu
@livcheerful

1 Like

Oh no! Which of the statements don’t work unless they are used backwards? I’m not sure I understand what you mean about the assets–right now I see three levels in the game, and when I play through the tilemap switches for each level. Which asset were you trying to set it to?

(Also this game is great! I love the rings and the hamster curling up into a ball when you jump :smiley: )

Not when passing the level, but when reseting it. If I try to make it turn into the same tilemap as the last, it will not do anything. The comparason that is off is the one with the spike overlap.

bugs?

Ah okay, so part of the problem is this:

image

When you use the “replace all” block, it changes the tilemap in the array also, so when you reset the level there are no rock/starter tiles and the hamster does not move back to the start. Since the hamster doesn’t move back, it keeps overlapping with the spikes, so the spike code is called several times in a row and the game ends. If you remove the replace all block, the spike overlap code should reset the level!

Not the game, but on the latest makeCode. It was recently updated. I also tend to find lots of bugs on anything for some reason ಠ_ಠ

1 Like

Not that the game ends, but that it subtracts more than it should. The how much to subtract comparison will no do anything unless it is on one certain order

1 Like

Does this do what you want it to?

From the code, it looks like if the player has between 1 and 10 points, subtract 10 points and reset the level. If the player has more than ten points, subtract all their points and reset the level. Is that right?

1 Like

Oh, I see.

No, It subtracts 10 if you have at least ten, or it subtracts all you have. When you fall of the screen or lose a life should be when you reset.

1 Like

Oh I see! Okay, a few small things:

Since the score is technically 100 points for every ring, it should check that score > 0 and score > 1000 (more than 10 rings) when subtracting 10:

image

The second thing is that after the player hits the spike there is knockback, which does mostly prevent double-overlaps, but we recently added some sprite flags that should also help. You can do something like this, which will make the player invincible for half a second

image

Does that get the behavior you’re looking for?

Code: https://makecode.com/_U8rCMEJkabdb

2 Likes

yes I forgot about the 100 score (facepalm)

2 Likes