Change scenes in HTML5 game

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Jimb

Good afternoon!
I use the version of GODOT 3.1.1 Stable. There was a difficulty in developing a game for HTML5. There is a need to make a transition between different scenes in the game (the number of scenes is more than 20 pieces). To do all the scenes in one .pck file is very problematic and severely limits in the future extension, and there will be a question about the memory used!
Question: how can I make a scene change through replacing .pck in an already exported scene ??
I hope you’ll give me a hand! Thank :slight_smile:

For example, I have a ready-made scene with the game interface (without locations and the player), when the player enter the game he has one button available in the interface scene - load the location.
When a button is clicked, an HTTP request is sent to the server, after which the location names are returned in JSON format: for example (“load”: “location_a.pck”). After that, a child node with location and player “location_a.pck” is added to the interface scene.
And then the gameplay …
When the conditions for switching to location b are reached, the child node with location “location_a.pck” is deleted in the initial interface scene and a new child node with location “location_b.pck” is added.

Jimb | 2019-10-05 06:15