0 votes

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 :-)

in Engine by (12 points)

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": "locationa.pck"). After that, a child node with location and player "locationa.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 "locationa.pck" is deleted in the initial interface scene and a new child node with location "locationb.pck" is added.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.