SLEEP, but program still runs in the background.

Previous topic - Next topic

Millerszone

I use "SLEEP 1000" to pause my game after the player scores, but after pause
the score has changed when returning to the game. Like the game is still running
in the background.

If this helps, I use the GETTIMER() for my movements.

Appreciate any help,
Mike
Hardware: iMac 27", MacBook Air, PC 3.5Ghz Quad
Developing Tools: GLBasic SDK, Gideros Studio, PureBasic
Developing for: iOS, Android, Windows, OS X, webOS, HTML5

MrTAToad

Oh yes, your program will still be running - SLEEP returns controls to the operating system, but all suspended applications will still run...

What you need to do is update (or reset) all timer movements after the SLEEP command

Millerszone

Yep that fixed it!
Thanks again MrTAToad.
Hardware: iMac 27", MacBook Air, PC 3.5Ghz Quad
Developing Tools: GLBasic SDK, Gideros Studio, PureBasic
Developing for: iOS, Android, Windows, OS X, webOS, HTML5