My game freezes!

Whenever I preview my game, it keeps on freezing. I even tried playing it on gd.games and it still won’t work. Please help me!!!
Play Mario Level

I tried it on my phone and the arrow image moved with the scene. So, I was only able to play it while the move button was touchable. The controls need to be on their own layer.

IDK if that’s the issue. Usually when a game locks up it’s from a crash or an infite loop like *while.

I fixed the UI but that wasn’t the problem. The Goombas are supposed to be moving. I have the second Goomba moving, but when I added the same code but for the Goomba1, it doesn’t move. The game freezes when Mario touches the Mushroom.

Did you update the exported online game? The original link still points to the original version. I’ll try it when I’m at my PC but we can’t help without seeing your events. Can you screenshot the relevant events?

I just edited my previous post. I’ll also update the link.

Is the default value for direction of goomba 2 set to left or right? As for freezing are you using a while event or changing the time scale or deactivated the platform object behavior or default controls. I’m still on my phone so it’s tough to read the events.

The default direction for Goomba2 is left, so it immediately hits the direction change trigger. I didn’t put in any while events, and I think it works fine when I remove Goomba2. I literally have no idea what’s going on! :scream:

If it helps, I can give you the link to the JSON file so you can view the events on your computer.

Can you post the events that reference the mushroom?

What is the purpose of this? The trigger once is first, so it will only trigger once on the 1st frame of the scene. So, it will move the Goomba 100 pixels only if it’s on the screen during the first frame. If the trigger once was on the bottom, then when the Goomba is on the screen it will move it 100px once unless it leaves and re-enters the screen.
.
image

If you want to share your project, I’ll take a look. You would need to post the entire project folder meaning the JSON and the assets.

I removed the Trigger once event for Goomba1 and that seemed to do the trick. I was also toying around with the events and I fixed the freezing problem. But the mushroom animation is messed up now. I’ll insert a link to the entire project folder.

https://drive.google.com/drive/folders/19VfLImkpO5C4d4rVHZsFT7ij0drcR3HU?usp=sharing

never mind, I see the asset folder

I think the animation just needed to be set to loop.

1 Like

Awesome! I guess I forgot to check that box. But now, the animation sometimes falls through the platforms. I’m wondering if each of the frames have slightly different dimensions and is causing some glitching in the collision masks.

Here is the updated link.

It’s not loading for me, for some reason. Shame too, I wanted to see the famous goomba2 in action.

Never mind, just finished loading.

Ok, just played it, and assuming it’s a prototype, it’s ok. However, it still seems like there’s some stuff you don’t know yet, so I recommend teaching yourself more about the engine.

Also, I’ve made my own Mario engine, kind of. If you want to use it, I could upload it to Github for everyone.

Could you please? This is probably my first actual game that’s built from scratch, so I might go through some of the tutorials.

I think it’s Mario’s hit boxes they’re not the same on the bottom. The one has a slanted bottom. Make sure the bottom all match his feet.

I’ve never done Mario. I wonder if it would be better to keep the images the same size and just scale Mario when he eats a mushroom. That would also reduce the necessary code.

You need to make sure when the animation changes the feet are in the exact same size. That means the hit box plus the origin. It might be better to put the origin point on the bottom so Mario scales or changes animation from the bottom. Otherwise, his bottom half is going to just appear below him…

Left has all the origin points at 0,0
Right each animation has the origin point at the bottom corner
ScreenRecorderProject15

The engine is nothing special. All it has really is the option to play as Mario or Luigi, as well as having tiled ground. Other than that, it’s just a regular default platformer. Also, the files are a huge mess, so if you want to use, your gonna have to figure it out yourself.

That worked! Thank you so much @Keith_1357! You’ve been so helpful!

1 Like

Forgot to add a screenshot, so here’s on from the editor
image