Recently I read a lot of articles comparing Unity and Godot game engines. Many of them encourage you to try the latter, especially if you want to develop 2D games. So, I decided to follow their advise and take a look at Godot.
The next step obviously was to look for tutorials and, as usual, the amount of material available on the internet was overwhelming. The most difficult thing is to find material that fits your learning style. So, I decided to organize the material I found in a series of tutorials that follow my journey in creating a small game in Godot. I hope that this tutorials can help others facing the same path.
If you are ready to follow me, let’s start!
Installing Godot is very simple:
- Go to godotengine.org e click Download at the top of the site
- Download the Standard Version for your system (I don’t think I’ll use C#, so there’s no need to download the version that includes Mono)
- Extract and copy the executable to a folder of your choice. Godot is self-contained and does not require installation.
Creating a new project
When you launch Godot, you’ll see the Project Manager window, where you can create and load game projects:
The first time you open Godot, since there are no previous projects, you will be asked if you want to explore the Asset Library (click Cancel, we can ignore it for now). After creating your first project, at launch you’ll be presented with a list of your projects. Double click on a project to open it in the editor.
To create a new project, click the New Project button.
The procedure to create a new project can be a little unintuitive because Godot doesn’t automatically create a folder for it. I think that the best sequence of operations is this:
- In Project Path, browse to the folder where you keep all your Godot projects.
- Write the name of your project and click Create folder button. Godot will create the folder and update the Project Path to use it.
- If everything went right, you will see a green check mark next to the project path. Now you can click on Create & Edit button. Godot will create the project and open it in the editor.
Once you have created the project, you should see the editor’s interface with the 3D workspace active:
Let’s do a quick tour of the Godot’s editor interface. We’re going to get into all of these things in detail in the future, when we cover each individual aspect of the engine.
At the center of the editor, occupying most of the screen, we find the currently active workspace, the area where most of the work will take place. We’ll talk about the available workspaces later in a paragraph dedicated to them.
Looking at the top of Godot’s window, on the left is the main menu, in the center the buttons for selecting the active workspace, and on the right the buttons for running and debugging the game.
On the left side, you’ll find the Scene dock, which lists the content of the current scene and where you can add new nodes (we’ll talk about scenes and nodes in the next post). The other tab, Import, is where you set properties of imported assets.
Below Scene and Import, you will find the FileSystem dock, where you’ll manage your project files and assets.
On the right side, you’ll find the Inspector, where you can view and edit the properties of nodes, and the Node panel, where you can hook up Signals (the Godot terminology for events) to scripts functions.
Finally, in the bottom part of the editor there are the Output panel, the Debugger console, the Audio mixer and the Animation editor. They are folded by default to save screen space.
Keep in mind that the position of the various elements is customizable and the default position of your version of Godot may be different from the one shown in this tutorial. If you customize the editor, don’t worry too much about screwing up the layout. You can always return to the default one using the menu Editor → Editor Layout → Default.
There are 4 workspaces in Godot:
- 2D: this workspace is used to edit 2D scenes. It is used also in 3D games to design user interfaces.
- 3D: in this workspace you can work with 3D objects, lights, and design levels for 3D games. I’m interested in developing 2D games, so I don’t think I’ll use this workspace very often.
- Script: this is the code editor where we’ll write scripts. It has auto-completion, debugger and built-in code reference.
- AssetLib: this is a library of assets that you can use in your projects for free.
You can change the current workspace using the buttons at the top of the interface. The first 3 workspaces can also be selected using the F1, F2 and F3 Keys, while F4 open the built-in code reference for scripting.
Each workspace has its own toolbar at the top, where you’ll find tools to move, scale or lock your scene’s objects.
Now that we have a basic knowledge of Godot’s editor, we will briefly look at Godot’s design philosophy to prepare us for our first test project.