Codementor Events

Understanding Godot Editor

Published Mar 17, 2019Last updated Mar 18, 2019
Understanding Godot Editor

Hey guys! In this post i am going to show you how you can use the editor of Godot. So, let's begin!

NOTE: This editor is from Godot Engine 3.1.

Ok. Let first run godot engine. This step depends on your os, because on Windows and Ubuntu you can run it with just double-click. But on Debian, which i use, you must run it through the terminal or configuring the menu, in order to run the engine. After the program loads, you’ll see the project manager.

project manager.png

Like the name suggests, you can create, edit, modify name, import, remove, and import template’s projects. There is no much to say here.

Now, lets create a project.

creating project.png

Here you can set the work directory and the name of the project.

IMPORTANT: Some engines create a folder with the name of the project, but Godot doesn’t do this. This might be annoying because you can expect this behaviour. This happen to me a lot. So much so that i ended with two projects within the same folder. I think you will see this better with an example:

Unity.
/your/project/path/{project-name}/{working-directory}

Godot.
/your/project/path/{working-directory}

After you set the path and the project name, click on “Create & Edit”. Now ladies and gentlemans, here is the big deal. This is the editor of G-O-D-O-T.

Ok, Enough!

editor.png

NOTE: I change the default view of the editor, so if it your first time, the distribution is going to be different.
In the middle you have the 3D viewport, which at top of the editor, there are some buttons, in order to allow you to change 3D viewport to 2D viewport, script editor, and an online market for plugins developed by the Godot’s community. To the left, you have the file explorer, which is divided in two part: Top part, it show you the structure of your project; and the bottom part, which shows you the content of the folder you have clicked. The right section has the import, scene, inspector, and node section. In scene section is where you add your nodes, in inspector section you can see the properties of the node you have added. Node section shows you another properties like signals and groups, and import section allows you to reimport some assets and modify some properties.

You may be asking what the hell is a Node, Scene, Signal, Group, and other stuff. I promise you to cover all these concepts later on.

In order to add a node, i need to explain what is a scene and a node. That is all we need for this post. This will be our hello world.

Let’s begin with a Node. A Node is, according to Godot’s doc, a block which contain properties, like: name, childs, and extend behavior through scripts. I like to think about them more as atoms, because godot has different kind of nodes which they inherit from a base node named “Node”. You can see Node as the hydrogen atom, and another Nodes more complex might be Oxygen, Carbon, etc. And for scene, the explanation is less complex, i promise. A scene is group of, at least, one node organized as a tree, that’s all.

adding node.png

Lets add a node named Label, In scene section there is a button with icon of a plus symbol. After you click on it, it will show up a panel with the different nodes that godot provides you. Look for control, unfold it and select Label.

After you add the Label Node, you are going to see the scene section has received an item.

label node.png

For the moment we are going to be in 2D viewport. Control nodes can be in 2D and 3D mode. but 2D mode include the camera, so less job for us 😃

When you click the Label, the inspector section change. you are now able to see the properties of the node. In those properties, you will see one named “text”, just click on it and type “Hello world”. As you can see, some section of the viewport has changed.

In order to run a scene, you first need to save it. This doesn’t need much details, am i right?

save scene.png

Now you have saved the scene, look at the panel over the scene tab, click on the fourth button from left, this button run the current scene.

running project.png

Congratulation! You have run successfully your first game. Commit it, and save it in your repo 😃

I hope you like this introduction to the engine. I will cover different topics with further posts.

Godot engine is an open source project, which is maintained by the community. If you want to help them, you have some options:

  • Join to the developer team.
  • Find bugs and report them.
  • You can contribute with money on patreon, this option will make you appear on the list of donors.

help.png

May the game code be with you!

Links:
https://docs.godotengine.org/

Discover and read more posts from Jordan Motta
get started
post commentsBe the first to share your opinion
Show more replies