Pause Problem
iWin
Member Posts: 334
im trying to make a pause button and i have enemies that come in waves. when i hit the pause buttons the enemies stops on the screen but when i hit the resume button the enemies do not start off where they paused on the screen, it was actually still moving but u just arent able to see it on the screen. does anyone have any suggestions on how to fix this problem.
thanks
thanks
Comments
You would have to program a pause feature on your own and track all of the assets in your game and their individual velocity, direction, etc....which is very cumbersome and difficult and resource intensive.
I recommend that you do not have a pause button. The pause feature only makes sense on games that do not have ongoing action...such as puzzle games.
Good luck!
In every actor create one master rule and put everything in it. Make the rule say:
When game.Pause = 0
then on your pause button, make it switch game.Pause back and forth between 0 and 1 by changeing the attribute
change attribute game.Pause to (game.Pause+1)%2
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Check out F is for Falling or Z is for Zombie in the webgames to see how it works,
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
http://gamesalad.com/game/play/46641
Pausing an actor on a timer is where I'm having issues. The actor will pause but the timer keeps going so is out of sync when I un-pause. Anyone know an angle for that?
There is a way round that, but it's convoluted and involves lovely equations and new variables and stuff.
A far cry from the 'preserve scene' of old...
But I digest...
I'll try and have a look at it over the weekend when I get a mo', and try and work out what CodeMonkey did on my game.
It'll help, but as Synthesis has said, it's a cumbersome, and in my opinion, horrible work-around. It kinda stifles your creativity when you're having to worry about how your actors are gonna work if you pause the game, as opposed to 'what crazy stuff can I do with them'.
Hold tight fella.
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Sorry mate.
What I'll try and do on the weekend is strip everything else out (very protective of this game!) and maybe upload the important bits to GS as an example.
Seriously though, it will absolutely crush you
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
As were expecting an update (Cough iPad Cough) soon, maybe a nice improvement with a pause function will be there too.
Which method of pausing do you use generally? Going to a new scene or Actor Pause screen above the scene? (I was doing the latter)
I was using the following method:
Make a pause scene
Make a 'return' button that returns you to whichever scene you came from
In-game:
If pause button is pressed
Go to Pause scene - preserve scene checkbox checked.
And that was it - took five minutes and worked like a charm till .8 came out.
Now everything's a complicated mess
I highly doubt that there'll be an improvement on this issue in the next update, which is why I asked for one to be implemented ASAP after the next update hits.
It's such a standard feature for a game (we were asking for it loads last year before the method I mentioned was implemented) that I can't really do anything without it being present I feel.
And yes, there's a workaround which I'll try and upload on the weekend. It made me cry. You might have better luck with it!
Cheers,
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Imagine not daring to update your old games, that desperately need updating, because the pause function would no longer work!
Imagine if the wonderfully simple save system was changed overnight and required you to create new variables for every single actor, every spawn point, everything, then ask you to work out some equations and then compare them all against eachother to come up with one variable to be saved. That's what it feels like!
On top of that, I can only imagine that adding more rules and checks on every actor can only reduce performance...
I love the GS guys so much for this software, I really do, and I do appreciate the help that's been sent my way. But sometimes they go against the grain, and it bloody hurts!
For example - GS had a built in d-pad. People liked it and requested that you could customise this feature and add more buttons, different graphics etc etc.
Instead, they removed it completely.
Not a huge deal with a d-pad as the logic was simple to understand and implement.
This though... this really smarts.
I use timers so much, for better or worse, with some random stuff thrown in on most of my games. If I want to make sub-standard simple games then fine. But I don't.
I'm a bit gutted too as the game should have been finished and I've already seen similar themed stuff on the app store. So I'm losing out here. People will think I've jumped on the bandwagon, when really I was putting one of the wheels on the damn thing!
Anyway, they know about it, and how I feel about it. You can all see it on the weekend when I upload it, and make your own minds up.
I won't accept that this is how it has to be though, and if the GS guys are honest with themselves, neither will they. It's really just not good enough!
Don't create another Synthesis!
Anyway, rant over!
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Anyway, the workaround for pause with timers can be found here:
http://gamesalad.com/game/play/48909
bear in mind that this just involves two actors being spawned from one spawner.
Look at how many variables you need to keep track of! It's bloody horrible
Anyway, if anyone can explain how it works, I'd appreciate it.
Still... now we've had the iPad build out, please bring back preserve scene, eh guys?
Cheers,
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Cheers,
QS.
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
I was describing the situation to a colleague and he was just aghast. I mean, it's not like we're asking for xbox/PS3 visuals on an iPhone.. it's a simple pause function ffs...
Like I said, your thoughts would be welcome.
QS:)
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Now that the iPad feature is out of the way, I'm sure GS will start concentrating on some of the more requested, if not expected features (please!). Here's looking at 8.5.
That's two of us against the world!
(they don't stand a chance!)
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
I just don't understand the workaround. It's way too complex, sorry!
Currently all we have is Jgary's solution from months ago, here, which for simple games is fine:
http://gamesalad.com/wiki/how_tos:gsc_game_pause_tutorial?s[]=pause
I think people have lost sight of the fact that these are games designed to be played on a mobile device - an absence of a pause feature, and a solution provided with no information, does not help us integrate such a feature in lieu of it being in GS as standard (As it once was).
I'm starting to get frustrated again as I want to move forward with confidence. I've heard nothing back from GS at all on this.
Could someone:
Please tell us when 'Preserve Scene', or another simple 'Pause' system will be implemented.
If you insist on not implementing it, can we hear your justifications? Pausing is a standard feature - it should not be a major headache for people to put into their games.
If the new system without pausing is to give us extra fps, how does adding dozens and dozens of checks into our actors affect the fps? Do we essentially get little or no benefit if we put 'pause' in?
I honestly and truly believe this is a priority feature. Come on - where's the love, eh?
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
You need an ACTOR INTEGER attribute
self.time left
When game.paused = false
every 1 sec change attribute self.time left to self.time left - 1
When self.time left = 0
(perform whatever action)
change self.time left to (whatever time it's supposed to be)
Little more work, but makes it play nice with pause.
Mate, you'll be glad to know I'm making progress on a game.
I'm leaving out pause for now as I still don't get it.
Maybe you wouldn't mind taking a look and putting in pause for all my actors/spawners when I'm done.
It's only a little more work, after all
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
I've just watched the conference video and, essentially, double tapping the home button will pause whatever you're playing, I believe, to bring up the multi-task screen...
If this is indeed the case, then we're all saved (if our games run only on a 3GS and up I guess).
Seriously though. Let's get this into GS for all those 3G iphones and 1st/2nd gen ipod touches, eh?
Cheers,
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
It may be easy for Gendai to implement a pause now, but as of now it doesn't.
Why does pause work *in* gamesalad when you preview stuff? AND when you view a game in a browser?
I'm about as far from technically minded as you can get, but as a layman, it baffles me that you can pause games so easily using the methods described above, yet putting it into a game (where, actually, it USED to work) is so hard?
Sadly I've just been ignored on this issue, and I seem to be a mainly lone voice in airing my concern here.
Still, stay positive, sheepy! At least I still have something to moan about!
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
And I believe it doesn't work because the 4.0 OS doesn't simply pause the apps by itself, it requires some lines of code in the app, albeit I've heard it's minimal. So that could mean in a somewhat near future update it could be used with little pain on GS's part, or it could mean nothing at all.
I should pay more attention in my classes so I can actually understand this stuff better