

The Node2D is now added to the scene and is shown both in 2D editor (main panel) and in the Scene panel. Eventually test the scene by clicking the play scene button in the header section of the editor.Here we save it in a scene folder that we just created. You can now save the scene with Scene > Save scene as.Among the displayed results, select the one you need and click create.Let's write Node2D which is a basic node type for 2D games. The list of pre-defined node types is quite long so we usually use the search field to get the one we want.This will show the Create New Node window. In the Scene panel, click the Add/Create a new node or use Ctrl+A.In fact, if we try to save it right now, Godot tells us there is no possibility to save an empty scene. This won't display anything in the editor as the scene is empty.

one scene to mix them all (and in the darkness bind them).Easier teamwork: Scenes can be edited by different members of the team, to enable them to integrate their content to the game.īased on this, we will created a scene for each element that our game will need:.Configurable: scenes can have different parameters that are unique for each instance, and affect their behaviour/appareance.Reusable: scenes will be instanced inside other scenes and contribute to game optimisation as well as reducing production time.All the behaviour specific to that feature will be contained in that scene. Encapsulation: a scene will encapsulate a certain feature or component of your game.We can sum up the purpose of the scene system with these characteristics: We already described the advantages of scenes in a previous chapter.
