PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

GameLoop()

pocketProggies · 28 Sep 2002, 09:55 UTC
After tinkering with PocketFrog a little, I have noticed that oddly enough, even after execution of GameLoop() SHOULD end, i.e. the last instruction has been executed, GameLoop() starts right back from the beginning again. After closely examining the examples, I am wondering how I end execution of GameLoop() after one iteration. Using a semaphore has not worked, nor have other convential methods of loop control. It does not seem logical to have the program start over again at the beginning of GameLoop() once the program should have already ended.
BurningSheep · 28 Sep 2002, 13:09 UTC — GameLoop()
GameLoop() will get called over and over again until you tell the app to exit by calling the function Shutdown()
This is the way PocketFrog was designed, you are supposed to draw one frame everytime GameLoop() gets called.
Conan · 28 Sep 2002, 13:16 UTC — ending the game
Do you have the following line in your code ?
Code:
Shutdown();//end the game


If you don't call shutdown the game won't end.
When you call shutdown() PocketFrog does it's own tidying up and calls the GameEnd() function where your own tidying up happens.

(looks like Burning Sheep just posted the same thing :)
BurningSheep · 28 Sep 2002, 13:34 UTC
just saw that codepunk opened a thread about this in the general dev. forum:

http://forums.pocketmatrix.com/viewtopic.php?t=7735