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 .NET / Pausing game

Author
Message
VB and GDK
14
Years of Service
User Offline
Joined: 2nd Jun 2009
Location:
Posted: 5th Dec 2009 03:16
What code is need to pause a game. I've tried exiting the While DarkGDK.Engine.LoopGDK() but cant get back in. Can any one help
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 5th Dec 2009 08:28 Edited at: 5th Dec 2009 08:29
Well, in general you could set a flag like InPause = 0, and while it is 0 your game would execute all the AI, Player Movement etc... But when you set it to 1 it would just freeze everything and render the pause screen and handle that one. e.g.




EDP Map Editor[2D]
VB and GDK
14
Years of Service
User Offline
Joined: 2nd Jun 2009
Location:
Posted: 10th Dec 2009 23:55
Could you please go into more depth with this.

thanks
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 11th Dec 2009 15:36
How could that go any more in-depth? You just need to add a way to freeze the screen and make a pause menu appear. For example the way I told above, you just stop doing the game actions when in pause mode, and handle the menu, and vice versa! That's pretty much all there is to it.


EDP Map Editor[2D]
VB and GDK
14
Years of Service
User Offline
Joined: 2nd Jun 2009
Location:
Posted: 12th Dec 2009 01:28
Ok i've got all of this working and the pause form opens but it is constantly blinking. Do you know how to stop this
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 12th Dec 2009 08:25
Not really, since I have no idea what on earth you've done to get it to work. Showing some code however might help us figure out what went wrong.


EDP Map Editor[2D]

Login to post a reply

Server time is: 2024-04-19 01:39:55
Your offset time is: 2024-04-19 01:39:55