Using saved scenes
Because we will use only one player in the game, we are not going to reuse the player scene multiple times. However, we will want to reuse the rocks and walls within the arena. Follow the steps in the Saving a branch as a new scene section to separate one boulder into a new scene:
Figure 8.8 – The boulder.tscn scene
Now, let’s reuse this new scene in our arena as the default rock:
- Go back to the main scene. Remove all the rocks from the scene; we don’t need them anymore.
- Select the
Arena
node. By doing so, everything we add will be added as a child of this node. - Now, drag and drop the boulder scene from FileSystem into the 2D editor. You will see the visual of the boulder pop up while you’re still dragging it around:
Figure 8.9 – Dragging and dropping the boulder.tscn scene into the main scene tree
Now, you can do the same for the inner walls in the...