I am experiencing a problem where when I play or test my game it takes at least 30 seconds for every room to load. I am trying to figure out why this is. I was wondering what kind of things the game does whenever it loads a room beyond what I tell it to do within the individual room transition script. I have been looking for a global script that is called on every room transition but cant find one. I have also been trying to find something broken to do with the player character but things appear normal. This behaviour seamed to start after I did the following: Created a empty GUI, added a short piece of music to the music folder, added a new room with only a background. Perhaps I damaged something accidentally.
I would appreciate help.
Maybe you should check each rooms 'Load'. Somethings should be in 'Afterfadein' rather than Load.
This has happened to me in the past where it was taking about 1 minute to load, and sometimes did not load at all.
Check that out and see what happens
Thanks for the reply.
I looked for a problem to do with what you mentioned, all seems to be were it should according to the manual. Though since the overlong loading time is rather standard for all rooms, I believe it would have to be a global thing causing it rather than room specific settings.
I wonder if you think it is likely that a computer error or setting outside of AGS is the cause of this.
in your global script, is there an on event function citing the "eEventEnterRoomBeforeFadein" event type? something along the lines of:
function on_event (EventType event, int data){
if(event == eEventEnterRoomBeforeFadein){
//stuff
}
}
Stuff in here may slow your game down (especially if there are blocking functions! - I'd check for those in Room_Load() as well...) it shouldn't actually be there unless you put it there though...
How does your game run the rest of the time? Normally or is it quite sluggish?
It would be a good idea to show us code for any of your rooms 'Load' so we can see what you have put.
I should have done this right away: I created a brand new game, added one room and it still loaded very slow. My conclusion is that the problem is beyond AGS, perhaps something simple such as data fragmentation.
Thanks for the help you both offered.
Sorry to waste your time on an unrelated issue.
What about if you created a new game. Added just one room with the player in that room and add just one thing when it opens. In afterfadein put:
Display("Yes, it works!");
If that does not work then you indeed have a windows issue or a bad ags installation problem or confliction between ags and windows.