About Store Forum Documentation Contact



Post Reply 
Pausing
Author Message
flipnSink95 Offline
Member

Post: #1
Pausing
So for my game I'm making, which will not only have single player but multiplayer as well, I'm wondering about pausing it for single player, and so it brings me to the question, how can I pause things?

I'm thinking of doing so by looping through a list of objects in the world that have animations and such, and by freezing them. How do I do this? That is if this is the best way to go about it.
11-30-2010 02:33 PM
Find all posts by this user Quote this message in a reply
Yurci Offline
Member

Post: #2
RE: Pausing
In GameUpdate()

if (MenuTab.window.hidden() || Sysinformation.window.hidden() || Options.window.hidden() || InformationPopup.window.hidden() )
{

//Everything u wanna update if menus are hidden
Clouds.layered.update();
Game::World.update(Cam.matrix.pos);
Water.update(Vec2(0.01));
UpdateCamera();
SUN_update();
}
(This post was last modified: 11-30-2010 03:40 PM by Yurci.)
11-30-2010 03:39 PM
Visit this user's website Find all posts by this user Quote this message in a reply
gwald Offline
Member

Post: #3
RE: Pausing
Hello,
I know this is old..
I want to pause the game play, which the Yurci's post works fine for that.
But it also pauses the GUI.

Is there anyway of pausing the gameplay and not the GUI?

update, I'll add
Gui.draw();

I'm sure that'll work smile

My Blog
http://www.esenthel.com/community/showthread.php?tid=6043

I hang out at Esenthel IRC Channel
http://webchat.freenode.net/?channels=#Esenthel
(This post was last modified: 03-07-2013 10:31 AM by gwald.)
03-07-2013 10:11 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Tottel Offline
Member

Post: #4
RE: Pausing
Make sure you add the GUI.Update() outside of the if-structure. smile
03-07-2013 11:05 AM
Find all posts by this user Quote this message in a reply
gwald Offline
Member

Post: #5
RE: Pausing
Thanks Tottel, that worked smile
But it didn't stop my AI lol
So, it's just easier stopping the chr and AI grin

Ah game dev is fun wink

My Blog
http://www.esenthel.com/community/showthread.php?tid=6043

I hang out at Esenthel IRC Channel
http://webchat.freenode.net/?channels=#Esenthel
03-07-2013 12:24 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply