Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Yuri Patrick on Wed 19/09/2012 12:40:20

Title: About blocking functions/actions...
Post by: Yuri Patrick on Wed 19/09/2012 12:40:20
I was just wondering, I have a room in my game with a lot of stuff going on. Yet, there is a 50/50 chance that when I quit/close/alt-f4 my game, that it will freeze and tell me that AGS has stopped responding.

Can a blocking function or action cause this reaction if it is not properly unblocked or whatever the proper term is?
Title: Re: About blocking functions/actions...
Post by: Crimson Wizard on Wed 19/09/2012 12:48:56
Quote from: wolverine79936 on Wed 19/09/2012 12:40:20
I was just wondering, I have a room in my game with a lot of stuff going on. Yet, there is a 50/50 chance that when I quit/close/alt-f4 my game, that it will freeze and tell me that AGS has stopped responding.

Can a blocking function or action cause this reaction if it is not properly unblocked or whatever the proper term is?
First of all, blocking action does not *really* block program execution, it blocks the game process with exception to what the action does. So blocking actions (like blocking character movements) should never prevent game from normally close on alt+x, alt+F4 etc.
I am not sure about endless loops in scripts (don't remember details right now) but I strongly doubt that they may cause application to freeze completely. Actually they do. :(
Does the game freezes even if you quit by choosing an option from game menu? If yes, then it has nothing to do with blocking actions.
Does this happen in any room, or only in certain rooms?


EDIT: Hmm, actually I was wrong. Endless loop in script WILL hang the app! :)
Title: Re: About blocking functions/actions...
Post by: Yuri Patrick on Wed 19/09/2012 16:13:51
Heya, Crimson. :)

First off, it's only in the crocodile moat room. Haven't got any other rooms just yet. ;)

Second off, it is usually during alt-x, alt-f4, clicking the close button for the window. Usually, as long as I use a scripted close function it works just fine. I can type quit in the parser, click quit in the game menu, etc, and everything quits like it should.

I have been reading a little more in the manual and just got to wondering if that might not be my problem. Looks like I have to revise my wandering script.
Title: Re: About blocking functions/actions...
Post by: cat on Wed 19/09/2012 16:56:47
I had this too with one of my games, but it only happened when started from the editor, not the game exe directly. Not sure what was causing that, though.
Title: Re: About blocking functions/actions...
Post by: Yuri Patrick on Thu 20/09/2012 03:24:15
Thanks, cat.

Never thought of trying to run my game outside of the editor. Perhaps its just a issue that was deemed minor enough to let go for a while. Or never showed up during debugging. *shrug*