Return to Specific "PAUSED" Scene

As far as im aware, currently theres no way of doing what im suggesting.

We have the option to Pause a scene and Start a new one, then we can use the Stop Current Scene and Return to the Previous Scene.

We can Pause multiple scenes, but when using the return to paused scene we cant pick which one, just the last one.

If we use the regular change scene and pick the paused one, we just create a new one and the paused one remains there waiting untill we either stop all paused scenes, or use return to previous scene.

Is there a way to implement choosing which paused scene to return to?
As in make the action "Stop current scene and return to paused scene “SceneName”.

This would free up some logic space, instead of making a bunch of global variables storing positions and stuff that happened on that scene, instead we can just use that feature.

It would make life SO MUCH EASIER in certain situations, not to mention its much nicer on events, since we dont have to make events that keep track of everything.

I suppose you can kinda do this in a sequencial way, but im talking about using it in a non sequencial way, for example.

  • Player starts at Level1
  • Pause scene and change to Level 2
  • Pause scene and change to Level 3
  • Level 3 has a direct door to Level 1
  • Stop Level 3 and Resume Level 1

I also tested opening about 100 paused scenes on my “Mana Knight” game, which is basically a finished project at this point, and no performance drop, i felt like i could keep on going forever and no fps would drop.

Why isnt this a thing yet?

Any chance this is possible to implement? Or is it one of those things that it might break GDevelop to implement?

I don’t know if this is enough for your purposes, but you can use an expression when changing scenes. You can then setup a variable of sorts like “next level” which can be placed in that text field. Note this field only shows up when using the change the scene and pause and start a new scene actions. See below

Is there an expression to return to a “PAUSED” scene?

I dont get what your saying…

As far as im aware, if you “pause” a scene, then use the regular change scene and select the “paused” scene, you just make a new one, you dont return to the paused.
one, right? or am i missing something?

EDIT: I get why you were confused, i wrote the title wrong, it was “Return to Specific Scene” when it should of said “Return to Specific PAUSED Scene”… my bad, sorry :slight_smile: I thought it was weird what you said… but thanks anyways, if you didnt say anything i wouldnt noticed the error!

1 Like

Because i dont like talking without knowing what im saying, i just tested it, and no, you cannot return to a paused scene without using the “Stop and return to previous scene”.

I also did more testing by opening a bunch of paused scenes in my “mana Knight” game, which is basically a finished project and… no lag.

I opened more than a hundred paused scenes, never stopping any of them, and no lag, i kept goin and no fps drops…

Why is this not a feature?!?!

It has no impact on performance and is such a useful thing to have!!

Please implement this if at all possible!!

Going to add some info based off my memory on discussions around this. Please note I’m just posting this to add context on current state/how it works as it does, not any judgements on whether this can or should change:

Paused scenes work like a stack of cards, to ensure as much memory optimization can be done as possible.

You can only ever place or remove a card (scene) onto or from the top of the stack, by design. (“Pause a scene” places a card on top of the stack, “go back to previous paused scene” picks up the card from the top of the stack. “Change scene” basically has you dump the deck of cards to find your specific card, and the card is no longer exactly as/where it was in the stack.)

Also, while you may not have experienced any fps issues in your scenario, paused scenes are kept in memory and with enough scenes paused (quantity will depend on the size of assets in those scenes and the player’s machine) it will impact performance if the player runs out of available ram, as the game cannot release those scenes assets and states from memory.

1 Like

Ill be honest Silver… usually when you explain stuff, it kinda makes sense, this time, not so much…

Its not the analogy, its the whole logic behind it…

Right now, you can stack plenty of combinations of this stuff, you just cant return to a specific paused scene.

You can Pause a scene and change to a different one, then you can keep changing scenes without ever returning to the paused one or stopping it.

You can Pause and change as many times in a row as you want while mixing in regular scene changes, but going back to the paused one can only be done in reverse order…

Im kinda talking out of my butt by saying this, but all things considered it dosent seem like a big change to implement this.

And as far as ram usage goes, devices these days have more than enough to spare, but if you plan on having your game run on older hardware, just use it sparingly, dont think performance is gonna be an issue.

It all comes down to how much work would be to implement.
This feature would be amazing if possible, so much work could be avoided, events trimmed down or avoided completly, newcomers would have a much easier time building games that involve saving things to memory etc…

Man… making RPGs or any non linear game would be a breeze…

Just to clarify, as this is how it was explained to me years ago:

The paused scenes go into a stack, like a deck of cards, in the order they were pasued. You can only remove from the top of the stack to keep the card in the “state” that it was once it was paused. Removing the top card keeps it in that state and resumes. If you use “Change scene”, it doesn’t attempt to pull from the stack, it just takes the card entirely with no regard for how it was paused, and starts it from scratch.

Again, this is not to say whether or not this request should be implemented, it’s just adding context on the current state.

Aside from this request itself, I strongly recommend avoiding making assumptions on ease/difficulty of something being implemented in the engine, especially when making feature requests. It’s not helpful to the conversation and may not be based in reality, so it can detract from any statements you’re trying to make.

1 Like

Thats fair, i didnt mean anything by it, hence the saying i was just talking out my butt.

And i get it now, the whole stacking scenes in memory when paused.

Still, would be really cool if this could be implemented, it would so useful in so many ways, it would open up so much and make work so much easier…

I dont mind doing work, im not being a lazy bum asking for things to be a bit faster… this change would be like going from trying to break a rock with a pillow, to using a full sized industrial jack hammer…

So, again… would be so awesome to have this…

1 Like

Just so you know, the reason i put (Why is this not a feature?!) in the title wasent to have a go at anyone, or mean anything bad by it.

I was genuinely curious as to why something that has so almost no impact on performance and is so immensely useful wasent already part of GDevelop.