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?

Author
Message
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 7th May 2007 01:51
whats a good way to pause your game while looking at your inventory like in morrowwind???
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 7th May 2007 01:58
Just make a Do/Loop within the Main loop

TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 7th May 2007 22:13
Put the inventory screen Do/Loop in a procedure and when the user presses the inventory key, gosub that procedure.

As DB isn't multi-tasking, this essentially 'freezes' the game until you exit out of the inventory screen and drop back to the game.

TDK_Man

Code Dragon
18
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 7th May 2007 22:36 Edited at: 8th May 2007 20:09
What a coincidence, I just finished a timer based movement system that handles pausing. Check this out, press up to pause and down to unpause. The timer based movement system is a two-stage pipeline and if you don't call it ever loop (such as when paused) everything will move really fast for one frame to catch up, thinking the framerate is extreamly slow. That's why you need to call Tbm_update() when unpausing to clear out the pipeline for the next frame.



"Once there was a polygon mesh who was very sad because he was only Gouraud shaded."
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 8th May 2007 04:10
thankyou very much everyone for the help!!!

Login to post a reply

Server time is: 2024-11-25 17:31:07
Your offset time is: 2024-11-25 17:31:07