Help save my mario game

I started a project a while back. It was a Super Mario copy/ripoff. Eventually i got bored of it and abandoned it. Sadly i abandoned it in the middle of a gamebreaking bug. I knew the cause of the bug when i made it, but i didn’t fix it. Now i want to work on it again, but i can barely move cause it’s so laggy. (Because of the bug)

I would love if someone could help me rescue my game.


Inside your forever loop, you’re creating ton of empty sprites:


I think you want to remove that code.

BTW I figured out the problem by turning on the “show stats” setting in the pause menu. The sprites number shoots up super fast


Thanks! It got rid off all the lag. The code was actually meant for making the little coin animation when you jump on some lucky blocks. Now i found a new problem. I got the code for jumping but for some reason it wont work. And i would love to get some help in making Mario jump higher when you hold the A button for longer. I got the platformer extension but i don’t know how to use it.

Here’s a picture of the code

You’re using the “If sprite vy(velocity = 0)” which is great, but you don’t use a “make sprite jump (num) pixels” block you use the "change sprite vy(velocity) by (num). If this doesn’t work that means you probably need to set the “vy” in controls to zero, or you need to set the “set ay(acceleration) to (num)” block to whatever you want your gravity to accelerate at.