What is a Node? 

A node is a fundamental element in Godot. 

Add a child node by pressing the plus

Select a Sprite2D

New Scene Tree:

Rename the node to Player

Drag and drop the Player.png

To the Texture property

Of the Sprite2D (Player) node.

Player appears

In the Scene's viewport


In the Transform property, 

found in the Inspector window, 

you can modify the position, rotation,

and scale of the Player sprite. 

If you change any of the values 

you will notice they update inside the

Viewport window. 

For example, setting the position to (50, 0)

will move it 50 pixels to the right. 

On the other hand, setting the position to (-150, 0) 

will move it 150 pixels to the left of the center of the graph.

What is a Scene? 


Scenes are collections of nodes that can be instanced (created/spawned) at any time. 

In our TestScene level is a Player node, 

We might also want other objects, 

like rocks, trees, or enemies.

Let's make our Player part of their own scene

 so that we can reuse it and edit is separately 

to the rest of the game world and objects.

This concept is similar to Prefabs in Unity.




Right-click on the Player Node

Scroll-down and select Save Branch as Scene

Save the Scene as Player.

Double-click the Player Scene in the FileSystem.

It will open in a new tab in the Viewport.

Return to your TestScene tab.

Drag and drop a few Player Scenes into the TestScene viewport.

You are creating multiple player instances (copies)

Now return to your Player Scene.

Change the colour of the Player

By Selecting Visibility and then

adjusting the modulate property.

The colour of the player changes in its scene.

Save the Player Scene

by pressing CTRL+S

 and return to the TestScene.

Now all the instances have changed colour.

Any changes we make to the Player scene affect all of the instances!

What happens when we add nodes to the Player Scene?

In the Player Scene

Right-Click the Root Node (Player)

Select Add Child Node

Select Sprite2D

Rename the Node to Coin

Use the Coin.png as the Texture.

Change the Transform - Position of the coin to 0x and -50y

This places the coin above the players head.

Save Player Scene and return to TestScene.

Every player instance will now have a coin above its head.