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.

Newcomers DBPro Corner / Pause game issue

Author
Message
kuljot
15
Years of Service
User Offline
Joined: 2nd Jan 2009
Location: sacramneto, ca united states
Posted: 8th Jul 2009 09:35 Edited at: 8th Jul 2009 09:36

Hey guys,
Im trying to make a pause feature for my game. This code makes my game pause. But to display the image on the screen you have to press the P key twice. Does anyone know how to fix that. Also i am putting the code in the main loop. It pasues but to get any text to show or to paste the image on the screen you have to press the "P" key 2 times. Thanks

Gateway GT5628 Quad Core Desktop Intel Core 2 Q6600 2.4GHz Quad Core 3072MB RAM / 500GB 7200 SATA II Hard drive DVD RW 18X multi dual NVIDIA GeForce 8500GT ....
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 8th Jul 2009 09:51
The image is pasted, but won't get drawn until the next sync command, hence forcing you to go into pause mode to first show the image and then exit it before the image will actually be visible.

Just change it something like so:


Hope that helps

kuljot
15
Years of Service
User Offline
Joined: 2nd Jan 2009
Location: sacramneto, ca united states
Posted: 8th Jul 2009 20:14
Hey Rudolpho Thanks. Your code didnt quite work but after modifying it a little bit i got it to work the way i wanted. Thanks so much. Heres the code i ended up using in case someone other person needs it in the future.


Gateway GT5628 Quad Core Desktop Intel Core 2 Q6600 2.4GHz Quad Core 3072MB RAM / 500GB 7200 SATA II Hard drive DVD RW 18X multi dual NVIDIA GeForce 8500GT ....

Login to post a reply

Server time is: 2024-11-24 03:46:52
Your offset time is: 2024-11-24 03:46:52