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 / Any way to pause a game in DBPro?

Author
Message
Gamer
21
Years of Service
User Offline
Joined: 29th Apr 2003
Location:
Posted: 17th May 2003 07:59
How would we pause a game lets say if the player presses F1 for help during a game?
MasterInsan0
21
Years of Service
User Offline
Joined: 14th May 2003
Location: United States
Posted: 17th May 2003 08:25
I'm just as new as most of the newbies on the newbie board, but my best guess would be to use a wait, sleep, or wait for a certain key command. Like, if you wanted to hit F1, leave the screen there, and hit F1 again to get rid of it, you could paste the sprite or whatever over the top of the screen (not sure how you would go about this, but I'm just suggesting) and then wait for the f1 key again. Then, when the player hits F1 again, the program resumes the loop from where it checked to see if F1 was pressed with deleting the sprite (and possibly sync-ing or something).

Remember, don't think of this as a good opinion...use it as a guide for figuring it out yourself, because I really have no idea how to do it myself.
Danmatsuma
21
Years of Service
User Offline
Joined: 2nd Mar 2003
Location: Australia
Posted: 17th May 2003 11:17
That's one way, but another would be to send the program into another loop with it's own sync so you could display an animated menu

Here's one way to do that:



ZX Spectrum 48k Issue 3, Radio shack Tape drive, Rank arena 12" T.V. set.
Sephnroth
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 17th May 2003 12:58
Just a random untested idea, but it seems functions hog the code to themselfs, so you could probably write something like:



Usually i would say While True.. but i cant remember if db will accept boolean values used like that so i just used 1 for saftey. In that while loop you could do anything you like too, display a pause screen for example or if you wished a special pause menu

Remember, im just guessing that would work in db, i see no reason why not but just test it to be sure

David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 17th May 2003 13:17
If you wanted to exit from the function, then you could be looking for "ExitFunction".

I suppose all my ideas have been shown already. But this is what I'd do:



You are the th person to view this signature.
Programmers don't die, they just Gosub without return....

Login to post a reply

Server time is: 2024-11-10 07:41:23
Your offset time is: 2024-11-10 07:41:23