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

[SOLVED] Game pauses when loading a new room

T

tamation

Guest
Hi all, the maps in my current game are quite large. Around 7680x1152 each, with hundreds of smaller objects within that space. I do have a script running that deactivates all the instances once the room is loaded to only show what's within the view, however when you first transition from one room to another, there is quite a long noticeable pause of 15-30 seconds until you actually enter it and the script starts running. At that point the game runs fine at 60fps with no pauses, it's just the initial swapping of rooms I'm having issues with.

If anyone knows exactly what causes this and what can be done to remove the pause I'd appreciate it a lot!
 

Simon Gust

Member
Pretty sure its the deactivation process that takes that much time. The room is loaded pretty quickly but then it freezes for the deactivation. The reason you still se the old room is because the draw events for the objects in the new room havent run yet.
 
T

tamation

Guest
Pretty sure its the deactivation process that takes that much time. The room is loaded pretty quickly but then it freezes for the deactivation. The reason you still se the old room is because the draw events for the objects in the new room havent run yet.
Hey! Thanks for the reply, I deactivated the deactivation script and tried entering a new room without it but the pause still happens.
 

Simon Gust

Member
Hey! Thanks for the reply, I deactivated the deactivation script and tried entering a new room without it but the pause still happens.
Is it related to those hundreds of objects? What is their purpose. What code do they have in the create event?
 
T

tamation

Guest
Is it related to those hundreds of objects? What is their purpose. What code do they have in the create event?
Mostly just tile objects, after looking into it some more it's probably related to the tiles create event code that sets their sprites based on position. Now I know what's causing it I'll be able to work on a fix. Thanks for the help!
 
Top