Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / After while(LoopGDK) is finished, dbprints after the loop flash for a split second

Author
Message
Rids
14
Years of Service
User Offline
Joined: 11th Nov 2010
Location:
Posted: 11th Nov 2010 11:44
I have a standard game loop running with dbSyncOn(); dbSyncRate(60); while(LoopGDK()); yada yada yada, dbSync(); after all that once the program is out of the loop, I have some dbPrints displaying the game score. The problem is they flash for a split second and then disappear. Anyone know why they only flash for a second. I have a dbWaitKey(); infront of those statements and one after. Also tried putting a dbWait(5000); behind the dbPrint and it still flashes super fast and disappears. I figure it has to have something to do with a screen refresh, but it is outside the loop so I don't get why it is doing this. I have 0 compile errors or warnings and other than this the program works fine.....
Any help is greatly appreciated!!!
SunDawg
19
Years of Service
User Offline
Joined: 21st Dec 2004
Location: Massachusetts
Posted: 12th Nov 2010 03:54 Edited at: 12th Nov 2010 03:55
How are you exiting the loop? If you're just pressing the escape key, it will close the program immediately which would result in that split second flash. Try instead using dbDisableEscapeKey() before your loop, then breaking on escape or whatever conditions you want to end the game with. (i.e., if(dbEscapeKey())break; )

Post your code to get more specific help.

Login to post a reply

Server time is: 2024-11-19 16:22:49
Your offset time is: 2024-11-19 16:22:49