• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Collisions Breaking Upon Room Re-entry

E

Erikelelf

Guest
Hey there!

So, I've been doing a Game Design course at my college and I've been working on a game which is going to be displayed on a college exhibition next week. I've been playing through my game and testing it to make sure everything works fine. So far, I've fixed pretty much all of the glitches I've found, but this one seems unfixable.

Basically, my game is played from a top-down perspective. You walk into doors to go to the next room which takes up the entire screen, no camera scrolling or anything. An area of my game has been working completely fine for month, but just now it has decided to break, and I think it has something to do with my version of Gamemaker. You play through the game completely fine, everything working as it should, but then you get to the area I was talking about. At first, everything is alright. You beat the enemies in the first room and go into the next one. Thing is, if you go back through the door you came through, suddenly ALL wall collision breaks for no discernible reason.

You can walk through walls. Projectiles and enemies won't collide at all with them either. Every single wall in every room is like this, and because I have a push statue puzzle it becomes impossible to proceed. And it makes absolutely no sense. I've checked my code. No apparent cause, even when using search and replace. I've used show_debug_log. All the walls are solid. I've set the walls to solid every single frame. Still nothing. And when I go back to an older version of Gamemaker, that part of the game works completely fine. I can't use that version though because it causes and equally gamebreaking problem earlier in the game where the player collides with objects from the previous room despite them not being persistent or present at all in the next room.

Has anyone else had a similar problem, and if so, do you have a fix? I've asked my tutor to install an older version that will hopefully fix the issue but if that doesn't work, I honestly have no idea what to do. The exhibition is next week and it has come at the worst possible time despite no sign of it being there before.

Can anyone help?
 

jo-thijs

Member
Hey there!

So, I've been doing a Game Design course at my college and I've been working on a game which is going to be displayed on a college exhibition next week. I've been playing through my game and testing it to make sure everything works fine. So far, I've fixed pretty much all of the glitches I've found, but this one seems unfixable.

Basically, my game is played from a top-down perspective. You walk into doors to go to the next room which takes up the entire screen, no camera scrolling or anything. An area of my game has been working completely fine for month, but just now it has decided to break, and I think it has something to do with my version of Gamemaker. You play through the game completely fine, everything working as it should, but then you get to the area I was talking about. At first, everything is alright. You beat the enemies in the first room and go into the next one. Thing is, if you go back through the door you came through, suddenly ALL wall collision breaks for no discernible reason.

You can walk through walls. Projectiles and enemies won't collide at all with them either. Every single wall in every room is like this, and because I have a push statue puzzle it becomes impossible to proceed. And it makes absolutely no sense. I've checked my code. No apparent cause, even when using search and replace. I've used show_debug_log. All the walls are solid. I've set the walls to solid every single frame. Still nothing. And when I go back to an older version of Gamemaker, that part of the game works completely fine. I can't use that version though because it causes and equally gamebreaking problem earlier in the game where the player collides with objects from the previous room despite them not being persistent or present at all in the next room.

Has anyone else had a similar problem, and if so, do you have a fix? I've asked my tutor to install an older version that will hopefully fix the issue but if that doesn't work, I honestly have no idea what to do. The exhibition is next week and it has come at the worst possible time despite no sign of it being there before.

Can anyone help?
That doesn't sound like a GM version bug to me.

We won't be able to help, unless you provide us with the relevant code of your project.

For example, how does your collision system work?
And how does reentering the room work?

EDIT:
You mentioned using solid objects, so can I assume you're dealing with collisions in collision events?
If so, you can already try put a show_message("...") in the collision event to try and see if the collision events get fired at all.
 
E

Erikelelf

Guest
That doesn't sound like a GM version bug to me.

We won't be able to help, unless you provide us with the relevant code of your project.

For example, how does your collision system work?
And how does reentering the room work?

EDIT:
You mentioned using solid objects, so can I assume you're dealing with collisions in collision events?
If so, you can already try put a show_message("...") in the collision event to try and see if the collision events get fired at all.
Well, I'm not sure what else it can be.

Whatever you're thinking, I've tried it. As I said, I've gone back to older versions with zero changes to any code and the glitch doesn't happen whatsoever.

I've simply set the walls to solid so you can't move through them, and until now that's worked completely fine. Going between rooms is fairly simple. You walk into a door, it goes to the next room and it repositions the player next to the door they came out of.

I've already tried what you suggested by using show_debug_message and the collisions aren't being called at all despite the walls being solid. I've checked whether they're solid too using the same method. There's nothing wrong with the hitboxes either. I really don't understand what could be causing it. You go through a door and suddenly all collisions related to the walls cease to exist in every single room despite there being about 5 different wall objects. Before you ask, I've checked my door code.
 
E

Erikelelf

Guest
I think it's a problem with the college computer's hardware/software. I've just tested the exact same version on my memory stick at home and it works completely fine.
 

TheouAegis

Member
What version of being maker are you using at College? What version is the "older version" you talk about? What version do you have at home?

On the computer at College on the recent version, click the dustpan icon, save your project, then close it, then reopen it and test if it works again.

Worst case scenario, if it works just fine at your home, compile it at home.
 
E

Erikelelf

Guest
Thanks for your help both of you.

I'm going to try what you suggested at college tomorrow. I'll post back here after that tomorrow with whether it has worked or not.
 
E

Erikelelf

Guest
The problem literally fixed itself. It was annoying, and I lost a lot of time, but I still managed to get my game up to a decent standard. Thanks for your help everyone!
 
Top