When you created the “Hello, World!” sample project earlier you probably noticed that it is pretty easy to keep track of your one node. However, imagine how hard it would be to manage hundreds of nodes! Luckily, scenes make this much more manageable for us! You can create as many scenes as you want and then have them saved to the disk. These scenes are known as packed scenes. Once a scene has been saved, it can be instanced into a scene just like any other node!
To give you an example of how instancing works we will download an example here. Once you have this downloaded and unzipped, you can click the import button inside of Godot and find the “project.godot” file in the extracted folder!
This project contains two scenes: Ball and Main. Ball contains the physics for the ball objects and Main contains the physics for the obstacles in the game.
Now that we have these scenes added, we can add an instance of Ball to our Main scene! To do this make sure you have opened the Main scene and then click the link button to add Ball.tscn to the scene. You will notice that it starts at the top-left corner of the screen. We want to click and drag the ball so that it will fall into the main obstacles. Once you have the ball positioned, you can click play and see how it interacts with the obstacles!
At this point, you can add as many instances of the Ball as you want! Simply click the instance button again and add it there! Once again you can drag these balls to where you want and then click run again to see the results!