Dynamic Sprite non-removal on quit--is that ok?

Started by Storygamer, Fri 08/06/2007 04:04:23

Previous topic - Next topic

Storygamer

Quick question.  I think this is actually NOT a problem, but I wanted to double-check.  I've developed a nice little custom Save/Load/Quit/Etc gui for my work-in-progress Sleight of Hand.  The GUI makes use of a Dynamic Sprite to display a screenshot of whatever save-slot is currently selected.  Normally the script calls "Delete" on the Dynamic Sprite when the GUI is "turned off" (game resumed), since this is what the help file advised.

Anyway, here's the (possible) issue.  If the player clicks "Quit" on the GUI then the game ends, but of course, since the GUI is still up and running at the end time, "Delete" is never actually called on the Dynamic Sprite.  When I play the game thru AGS's "test game" function, the result after quitting is an error message telling me that the Dynamic Sprite was never deleted.

Now, I don't think this is actually a problem--if one quits the game and thus ends the program, it seems to me that the memory being used for the Dynamic Sprite would automatically be freed, regardless.  Also, I am assuming this little error message will not pop up when the game is run from it's actual distributed executable.

So, I am just looking for verification/contradiction here.  Is this going to cause any problem with players' computers after the program ends?  If not, then I'm not worried about it (just need someone to smile and nod I guess).  If it IS a problem, and suggested solutions would be most welcome.

Gilbert

Well, there should be no problem.

Normally if you quit a game without deleting some DynamiteSprites, the only consequence is a warning message would be written silently to a log file, which shouldn't affect the players (apart from a bit of annoyance when they discover an unwanted file).

When you test a game using the editor, to help developers debug their games all the warning messages would be displayed visually, so you are acknowledged of possible problems and can fix them if necessary.

Of course, to polish stuff, when the quit button is pressed you may first close the GUI and Delete the DynamiteSprite(s), before execute QuitGame(), but it won't hurt if you don't want to do these complicated stuff.

Storygamer


SMF spam blocked by CleanTalk