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.

AppGameKit Classic Chat / How to pause a game ? is there a function which can suspend the app?

Author
Message
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 27th Dec 2011 13:31
I want to pause the game,so I didn't update the state of the sprite, but sprite still playing. How to do ?

The Miracrea Games
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 27th Dec 2011 13:42 Edited at: 27th Dec 2011 13:44
There is no one command for this. You have to stop any physics simulation by calling stepPhysics(0) and then put a pause menu in at a smaller depth value so it appears in front of your game sprites.

Edit: forgot to say that you'll have to set the animated sprite frame manually to stop it playing.

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 27th Dec 2011 13:59
and you cannot pause any Particle effect, it keeps on playing
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 27th Dec 2011 14:01
@Baxslash, I see. I think there are a lot of work to do ,because there are thousands of sprites to stop.

The Miracrea Games
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 27th Dec 2011 14:02
@bjadams: it's a bad news for me ,I think.

The Miracrea Games
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 27th Dec 2011 16:48
You could put a request in for a new enhancement "setSpritesPlaying(onOff)"

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 27th Dec 2011 17:31
Another option would be not to Sync()

But I don't know if touch would still keep working
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 29th Dec 2011 00:33
So this is irrelavent whether on T1 or T2?

halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 29th Dec 2011 07:10
I am using Tier2.

The Miracrea Games
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 6th Jan 2012 11:54
The trick with a general 'pause' command, is that you would pause everything, even the interactions that overlay the paused game you wanted to use. Normally pause is engineered in code, but let me know if there are gaps in what you can individually pause. My understanding is that you can pause everything on a one by one basis.

I drink tea, and in my spare time I write software.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 6th Jan 2012 16:58
Lee you cannot pause/freeze the particle system in any way.
Anything else is pausable

Login to post a reply

Server time is: 2024-11-22 20:16:01
Your offset time is: 2024-11-22 20:16:01