GLBasic forum

Main forum => GLBasic - en => Topic started by: Millerszone on 2010-Oct-02

Title: SLEEP, but program still runs in the background.
Post by: Millerszone on 2010-Oct-02
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
Title: Re: SLEEP, but program still runs in the background.
Post by: MrTAToad on 2010-Oct-02
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
Title: Re: SLEEP, but program still runs in the background.
Post by: Millerszone on 2010-Oct-02
Yep that fixed it!
Thanks again MrTAToad.