0 votes

how do you make a game with more than one level like mario games if the project only allows one main scene

in Engine by (389 points)

1 Answer

0 votes

you make a main scene(sort of a game controller) which control the nodes and levels and everything... the player, level and everything else should be at point of use a child node...

by (1,181 points)

can you give me an example

Well, i made a practice cars game... had a main_scene which stored the paths to every node i will need, and some values, at the start of the game it would load the main menu, after picking something from there(aka a map to play in) the main_scene would remove what he got now as a child and will place the map and the player, when the game ends(aka player crashes) the player would send a signal to the main_scene to set the post game screen, so the main_scene would remove all of his current children and will place the post screen menu

EDIT: you can also use the main_scene to pass variables around like the score or the last map played or whatever you need

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 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 webmaster@godotengine.org with your username.