Multiple levels

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Newby
:warning: Old Version Published before Godot 3 was released.

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

:bust_in_silhouette: Reply From: rustyStriker


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…

can you give me an example

Newby | 2017-10-27 23:02

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

rustyStriker | 2017-10-27 23:13