• 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!

Legacy GM Game is freezing at a certain point

W

Wild_West

Guest
My game is suddenly freezing up and becoming unresponsive.
Seemingly whenever I get a few steps into the first level.

This wasn't happening before I started trying to implement my save/load game setup, but I don't know how that could be doing it because there's only one place I loop anything and it's AFTER a new game is replacing a would-be old save file since I have a few global arrays and just needed to empty them all on a new game start.

I tried commenting out the loop in my menu script anyway and it's still happening.
Everything else operates lke it should until I actually start up a playable level, a few seconds go by and bam, lock down.

Is it just like too much emory being used? Because this is just me testing stuff so the room itself has barely any objects in it.

I'm lost here.
 

jo-thijs

Member
We've got too little information to work with.
Can you give some code or object information or temporarilly upload your project somewhere?
 

Bingdom

Googledom
You can find the issue by doing this
Run the game in debug mode
Right click on the blue bar thingy, look for profile. Then, click on that black circle. After that it will turn red and every instance in your room will be shown and the one with the highest step% would be the source of your problem.
upload_2016-9-4_23-35-42.png
 

SnoutUp

Member
My guess is that you're creating new instances somewhere in the step event (or create same instance in the create event) and not destroying them. Been there, done that.
 
W

Wild_West

Guest
My guess is that you're creating new instances somewhere in the step event (or create same instance in the create event) and not destroying them. Been there, done that.
I don't think that's it, the only thing creating anything is my puzzle block objects and I've already proof tested them.
 
W

Wild_West

Guest
We've got too little information to work with.
Can you give some code or object information or temporarilly upload your project somewhere?
I wanted to do that yeah but had no idea how or where
 

jo-thijs

Member
Which code?
You can use Bingdom's suggestion for that.

How and where to upload?
You can use mediafire, onedrive, dropbox, box, google drive, ...
You can upload a file there, then click on the file and share it.
You'll get some URL that links to the file.
You then copypaste that link here.
 
W

Wild_West

Guest
I followed the steps but no object names showed up.
There was a red bar at the lower right saying target connection lost so I'm guessing that's why
 
W

Wild_West

Guest
Which code?
You can use Bingdom's suggestion for that.

How and where to upload?
You can use mediafire, onedrive, dropbox, box, google drive, ...
You can upload a file there, then click on the file and share it.
You'll get some URL that links to the file.
You then copypaste that link here.
Okay thanks
 

SnoutUp

Member
I don't think that's it, the only thing creating anything is my puzzle block objects and I've already proof tested them.
You can also try to outputting instance_count to make sure that it's not the object overflow causing this. Can it be that your game keeps loading the save file over and over and over again?
 
W

Wild_West

Guest
You can also try to outputting instance_count to make sure that it's not the object overflow causing this. Can it be that your game keeps loading the save file over and over and over again?
you know I would think that except like I said I commented out the save script and the same thing happened.
Beyond my player, some coins to pick up, the blocks for making treasures to get and advance , the warp object to clear the level and get some bonuses, there's nothing else in the room
 

jo-thijs

Member
That's the gmx file, which actually doesn't contain all that much information of your project.
You should click on "File", then on "Export Project" to get a gmz file of your project which does contain everything.
 
W

Wild_West

Guest
That's the gmx file, which actually doesn't contain all that much information of your project.
You should click on "File", then on "Export Project" to get a gmz file of your project which does contain everything.
Oh whoops :p Okay here's the Gmz one.

http://www.mediafire.com/download/y0y2cpz1vsufsax/Adventure_World_Platform_game_final_Version.gmz

and actually it turns out the game isn't freezing because I could actually hear the sound effects when I pressed keys, and could even click to exit the room after I pressed space to pause.
So it's just the image of the room that's freezing in place.
Which honestly is even more confusing.
 

TheouAegis

Member
Are you sure you didn't draw a surface to the screen that doesn't get updated? Like, did you create a "screenshot" and accidentally save it to a used surface that is then just drawing the screenshot over and over?

Did you accidentally disable any of the automatic drawing functions?

Edit: the file is currently downloading
 

TheouAegis

Member
One thing I noticed, although maybe it's because I'm using the normal Studio - your resources are too large. Your sky images are over 5000 pixels wide and are getting scaled down on compile.

What is the first stage? Where am I supposed to be clicking to get this thing to freeze up?
 
W

Wild_West

Guest
Are you sure you didn't draw a surface to the screen that doesn't get updated? Like, did you create a "screenshot" and accidentally save it to a used surface that is then just drawing the screenshot over and over?

Did you accidentally disable any of the automatic drawing functions?

Edit: the file is currently downloading
No I don't have any surface drawing functions going on.
As for the disabling thing I'd probably need an example of how to even do that before I'd know if I did lol
 
W

Wild_West

Guest
One thing I noticed, although maybe it's because I'm using the normal Studio - your resources are too large. Your sky images are over 5000 pixels wide and are getting scaled down on compile.

What is the first stage? Where am I supposed to be clicking to get this thing to freeze up?
No it's not you that is the default size for them :p my rooms are 700 in height but I made the backgrounds longer so the scenery doesn't look so weird as it tiles going across.
Not such an issue with a sky I know but it's odd those are the only ones actually Being rescaled.

Anyway the game always freezes when you start at region 1. That's the BIG orange area. Just hover over it and click the left mouse button when you see it glow, pick stage 1 and you'll see
 

jo-thijs

Member
I tried that level a couple of times and it didn't crash (nor did the screen freeze).
I did have an other problem though, every time I try to run the game for a second time, it doesn't compile for some reason, not even when clearing the asset cache.
 
W

Wild_West

Guest
I tried that level a couple of times and it didn't crash (nor did the screen freeze).
I did have an other problem though, every time I try to run the game for a second time, it doesn't compile for some reason, not even when clearing the asset cache.
Really? well that's never happened to me. All kinds of odd bugs both ways now jeez :p
How long were you in the level, it usually takes like 20-30 seconds before mine freezes the screen
 

TheouAegis

Member
Maybe the resizing of the sky textures messes it up. Maybe you ran out of memory. I'm at work now, so I can't test it myself.
 
W

Wild_West

Guest
Maybe the resizing of the sky textures messes it up. Maybe you ran out of memory. I'm at work now, so I can't test it myself.
I've had those sky backgrounds for a while, this game's been like a year and a half in the making while I was learning gml initially so unless my sudden increase in backgrounds or objects is the reason...

But I did resize them anyway so I'll tet it again tomorrow
 

jo-thijs

Member
I stay in the level for minutes every time without the screen freezing.
The compiling problems I had yesterday also seem to have solved themselves today.
Perhaps some specific things you do trigger the screen freeze?
Do you load anything? Do you do any specific actions in the level?
 
W

Wild_West

Guest
I stay in the level for minutes every time without the screen freezing.
The compiling problems I had yesterday also seem to have solved themselves today.
Perhaps some specific things you do trigger the screen freeze?
Do you load anything? Do you do any specific actions in the level?
Not that I can think of.
Just a jump here and there on my way to testing the warp point/ level unlock setup
It usually happens right when my level timer hits about 10 : 35

Also I just tried to open my project again for the first time today and it didn't start either, something about unable to create bitmap of size 20 something x 20 something.

This has happened before too and then it seems to go away for reasons I've yet to understand, could be what happened to you yesterday :p
 
W

Wild_West

Guest
I stay in the level for minutes every time without the screen freezing.
The compiling problems I had yesterday also seem to have solved themselves today.
Perhaps some specific things you do trigger the screen freeze?
Do you load anything? Do you do any specific actions in the level?
Okay well I went back in after the bitmap thing stopped happening and of course now it doesn't freeze the screen image ><
Still have no idea what happened, which isn't good for if it comes back. This is so confusing :p
 
W

Wild_West

Guest
I resized the sky backgrounds so no more resizing on compile, but the problem was still there.
So I just up and deleted the whole room and made a replacement, it seemed to go away but came back again.
I copied the first room exactly in terms of what objects I had in it, and it was okay at first, but now it's freezing again.
So I took the enemies out and went back in with nothing but my player, exit warp and the scenery, and no freeze.
It can't be the enemies though because I tested a different level that had enemies in it and it was fine, so for now it seems it's still ONLY this first room even after I replaced it.
I mean maybe the other rooms are just inconsistent in terms of this bug I don't know but I just have no clue what could be causing it.
 
There is an outside chance that there is some garbage data in one of your objects that wasn't correctly removed. Perhaps (if you don't have too many) try rebuilding your enemy objects one at a time. Just a suggestion, and it may not help, but I have had some odd things happen in the past like this.
 
W

Wild_West

Guest
Not sure what you mean by garbage data, but I have 43 different enemy types, so not too keen on having to re implement them lol
I mean I have deleted and replaced some during testing. I might have imported sprites from an old testing project that I deleted since I was done with it, could that be anything like what you mean in terms of garbage data?
 
Sorry for not explaining a bit more. I've had times when something in the object would get removed, but not directly, like a script would get deleted or something, but the object would still think its there, causing really hard to track down errors. I haven't noticed this happen in quite a long time, so it might have been an issue with an older version of Studio, but if all else fails, it could be something you try. I know I wouldn't be very keen on it either!
 
W

Wild_West

Guest
Sorry for not explaining a bit more. I've had times when something in the object would get removed, but not directly, like a script would get deleted or something, but the object would still think its there, causing really hard to track down errors. I haven't noticed this happen in quite a long time, so it might have been an issue with an older version of Studio, but if all else fails, it could be something you try. I know I wouldn't be very keen on it either!

I do have a small handful of scripts my enemies use, but it's mostly just how to collide with the player, limiting hp, dropping items after death.
This freezing thing is relatively new though, only started like a week or two back and has been on and off as I manipulate the room. Then when I think I have the answer it comes back again despite the changes.
But you might be on to something because I've gone back in at least 3 times now with no enemies and it's still working fine.
I'm gonna add one now to see if it comes back
 
W

Wild_West

Guest
Okay after a second test, I only put 2 enemies in the room, (same object), no freeze.
So I then put in a few extras, (different objects) and freeze.
Now what's great about that is the freeze happened when I put in the same enemy type as the last time I saw the screen freeze, what's bad is the freeze happened at least once or twice before that I remember, when that particular enemy wasn't present in the room.
Also I test every one of my enemies in a practice file before importing them into my real game file just for the sake of compile speed, and there was no freeze in the test file when using this enemy. So why it's freezing the screen in this file I still don't know.

What REALLY makes no sense is that if it's something about the enemies then why doesn't level 2 freeze even though it has the same ones as level 1 when that was freezing?
 
W

Wild_West

Guest
Sorry for not explaining a bit more. I've had times when something in the object would get removed, but not directly, like a script would get deleted or something, but the object would still think its there, causing really hard to track down errors. I haven't noticed this happen in quite a long time, so it might have been an issue with an older version of Studio, but if all else fails, it could be something you try. I know I wouldn't be very keen on it either!

I think I have it narrowed down, I removed the step event code in my game bug object and the screen didn't freeze after I got near it, so apparently this stuff is the culprit.

Code:
direction += choose(5, -5);
  
x = game_bug.x + lengthdir_x(game_bug.nest_radius/2, direction);
y = game_bug.y + lengthdir_y(game_bug.nest_radius,   direction);
This is it's create event stuff too but I don't know if it could be affecting or conflicting with anything.

Code:
image_blend = c_lime;
image_speed = .3;

speed = 1;

hp = 5;
atk = 10;
grd = 0;

randomize();
direction = round( random(359) );
All the times I tested this object before I never got this freezing screen issue so it has to be something different about the room it's in as well since it doesn't happen in level 2, at least not that I've seen yet.
 
Wow, that really makes no sense as to why it would be freezing up your game. You don't have any collision stuff involved that would be causing some kind of cascading issues would you?
 
W

Wild_West

Guest
Wow, that really makes no sense as to why it would be freezing up your game. You don't have any collision stuff involved that would be causing some kind of cascading issues would you?
Only with the player to take off hp like all my other enemies
 
W

Wild_West

Guest
Wow, that really makes no sense as to why it would be freezing up your game. You don't have any collision stuff involved that would be causing some kind of cascading issues would you?
Okay well I took out the comments after seeing that the screen wasn't freezing anymore to check if it'd start again for sure, and of course it didn't.
I'm honesty 100% lost on what this is.
 
D

darthb

Guest
The same thing is happening to my game, i deleted all my levels and tested it and then it started working, added more to the code of my enemy, it started freezing again so I deleted the code I did and it keeps freezing still.
 
W

Wild_West

Guest
The same thing is happening to my game, i deleted all my levels and tested it and then it started working, added more to the code of my enemy, it started freezing again so I deleted the code I did and it keeps freezing still.
I wish I could help, this is a real pain but I still haven't resolved mine. Although I'm pretty sure it's a lack of cpu processing power on my part.
 
F

Falconsoft-Industries

Guest
It maybe possible that game maker studio is registering game_bug as a actual bug, so try renaming game_bug
 
W

Wild_West

Guest
It maybe possible that game maker studio is registering game_bug as a actual bug, so try renaming game_bug
Is that a thing that can actually happen? lol I only named it that to be funny. Like the in game text about it saying the game has bugs in it.
But I don't know that it would be that because it happens in the room without the game bug object too when I used an earth power against an enemy.
 
B

Blakkid489

Guest
I'm having the same issue honestly. I'm starting to think its studio bugging out
 
I wanted to look into this, but I cann't figure out what I need to do to reproduce the problem. You say it happens a few steps into the first level, but which is the first level?

Edit: there's a crash that happens if you touch a whirling blue thing, I think a warp hole.

############################################################################################
FATAL ERROR in
action number 1
of Keyboard Event for <Right> Key
for object West:

Variable West.move_right(100021, -2147483648) not set before reading it.
at gml_Object_West_Key_RIGHT_1 (line 6) - if place_free(bbox_right,y) and (move_right) and not(move_down)
#####################################################################
 
Last edited:
W

Wild_West

Guest
FATAL ERROR in
action number 1
of Keyboard Event for <Right> Key
for object West:

Variable West.move_right(100021, -2147483648) not set before reading it.
at gml_Object_West_Key_RIGHT_1 (line 6) - if place_free(bbox_right,y) and (move_right) and not(move_down)
That's an old bug I fixed already.
Although there is another issue with that warp hole object, in a different room, where it now is supposed to save the game when I touch it then take me to map select. For some reason in this 1 room only it endlessly saves but this doesn't happen in the room the game freeze happens in, which is just level 1. The earlier freeze is happening from something to do with the enemy objects, too many instances I guess.
 
Top