[URGENT] Pause

My game relies heavily on transitions.

I’m currently using the Game Edition of Corona.

Due to the amount of objects transitioning on the screen, I’m not able to “remember” where transitions left off and start them back up.

For example, I have a table of enemies that are on the screen. They all use different transition properties, such as longer delays or faster movements.

My request is a pause function. If it’s not feasible for pausing the entire game on its own, at least a pause function for transitions.

In my opinion this is a necessary feature that almost breaks the game-creation potential of Corona without it.
[import]uid: 7366 topic_id: 1363 reply_id: 301363[/import]

Do you want to pause all transitions at once? And then resume? [import]uid: 26 topic_id: 1363 reply_id: 3740[/import]

I think what would be best would be individual pausing.

That way the pausing of transitions is more flexible;

For example, I could have a “freeze all enemies” powerup which would pause the enemy movement but not the movement of other game objects currently transitioning. After X seconds I could loop through all of the enemies and resume their transitions.

The functions that should be available under the transition class:

.pause and .resume [import]uid: 7366 topic_id: 1363 reply_id: 3759[/import]

Is this being added to the feature request list?

I havn’t heard back. [import]uid: 7366 topic_id: 1363 reply_id: 3878[/import]

Hi,

I just wanted to let you know we’re looking into this. Pausing and resuming transitions is on the feature request list.

-GIlbert [import]uid: 5917 topic_id: 1363 reply_id: 3880[/import]

Excellent. I look forward to it (anxiously!) [import]uid: 7366 topic_id: 1363 reply_id: 4043[/import]

Any news on this? [import]uid: 8192 topic_id: 1363 reply_id: 6776[/import]

I’ve added this to our user-contributed issue tracker, so you can follow the status of this feature request. It’s definitely a frequently requested feature.

Here is the url:
http://developer.anscamobile.com/issues/2251

You should also consider using programmatic animations:
https://developer.anscamobile.com/content/animation#CustomProgrammatic_Animations

With programmatic animations pausing/stopping animations is possibly by simply removing the event listener that’s driving the animation, e.g.

Runtime:removeEventListener( “enterFrame”, animate )

Then resuming the animation can be done by simply re-adding the event listener. The object should maintain it’s alpha, x, y, and other properties and pick up where it left off, e.g.

Runtime:addEventListener( “enterFrame”, animate )

Thanks,
Gilbert [import]uid: 5917 topic_id: 1363 reply_id: 6781[/import]

@ Gilbert. Thanks for the info. I am now trying to implement this. Unfortunately this makes it hard to use easing function and more features. It’s also complicated to pause timers. A low level pause function similar to when you turn off or lock your phone would be great. I hope it makes it in the next release or soon after.

[import]uid: 8192 topic_id: 1363 reply_id: 7163[/import]

I second amigoni’s request to pause timers in addition to animations/transitions. In fact this should be a low level app function that pauses everything - timers, animations, physics (in Game Edition), audio. When the game is unpaused, it should return the time in milliseconds that the app was paused so we can account for that in time-based functions. It might also be beneficial to specify what we want to pause - for example, I may not want to pause timers on certain apps that perform functions at a specific time of day, or I may want the audio to still play while a game is paused.

[import]uid: 8194 topic_id: 1363 reply_id: 7314[/import]