Overworld / Subworld pause management in an RPG

Godot Version

Godot 4.3

Question

How to manage overworld in a traditional RPG with a battle scene separate from the overworld - specifically how to pause the overworld so that player and entity positions are saved and don’t move while battling

I’ve come to the Godot wizards for advice on how to pause an overworld while maintaining its data and state. I have 3 methods in mind that I am trying to implement and would like to know if anyone has any tips doing either

Method 1 - pause Overworld with processing mode

This wouldn’t be the whole tree, just the overworld scene, and would play the battle scene then queue_free itself and unpause the overworld in some kind of battle_scene_end() func

Method 2 - orphan the overworld and re add later

I’ve read that the tree won’t propagate process to orphaned nodes. In my head this means I can have a script orphan and save the overworld node while instantiating the battle scene, then re add the overworld back into the game after the battle scene is over

Method 3 - save the current state of overworld to a file, and reload it after the battle scene

This is the one I know the least about, I haven’t gotten to saves and reading files in Godot yet - but it seems straightforward. Save the overworld scene (or data related to the overworld such as player position) and then reload that save after the battle scene.

Closing remarks

This post is part of the research for this feature, hopefully you can point me in the direction of better resources.

That kinda depends on the specifics of the project.
E.g. if your “battle” takes place in the overworld location, e.g. some arena, and you only want to pause the rest of the world without deleting it, then you can use method 1.
If your battle is completely remote and has no physical connection to the overworld (think like Heroes style), then it might make sense to go with method 3 - save the overworld state, unload the overworld scene completely and load the battle scene for the duration of the battle, and then reload the overworld again. This will add some loading time for the scene saving and loading, but might gain benefit in terms of optimization during the battle scene, because there is less clutter loaded into memory.

As usual, the answer is “it all depends” :slight_smile:

1 Like