Hero image!

Hello World, Godot

September 19, 2023 - Drygast
Game Dev GDScript Godot Hello World Install

First things first. I'm no expert with the Godot Engine; I'm just documenting my journey as I learn here. My experience is mostly trial-and-error with lots of research along the way. Through this "log", I hope to share what I've learned so far and provide a starting point for others who may be in a similar situation. In this first entry in my journey with Godot, I will be installing Godot, configuring it, and building my first project.

TLDR

  • I'm not an expert in Godot, this is more of a "documenting my journey as I learn".
  • Download and install godot game engine https://godotengine.org/.
  • Configure things if necessary (let's just ignore that for now)
  • Create a basic RichTextLabel, set the text to "Hello World!" and drag it to the center.
  • Build and run the project.
  • Thats it... If you already know how to do that, this article is not for you

Installing the Godot game engine

The first step is to download and install the Godot engine. This process will vary depending on which operating system you are using and I'm only going to install Godot on windows. On Windows, go to the Godot website https://godotengine.org/ and click the "download latest" button. This will take you to the download page for windows https://godotengine.org/download/windows/ and here you should click the version you want to download. "Godot Engine" is the default download that uses GDScript. "Godot Engine - .NET" is the version that uses C#. "LTS" stands for long term support, but for this article, thats not important. I'm gonna choose the default version.
(On macOS, you will need to install the latest version of the Homebrew package manager. On Linux, you can download the source code from the GitHub repository.)

Download standard version

Once the file has been downloaded (~52MB .zip file), unzip it into a directory somewhere on your computer. I choose to unzip the file into a new folder called C:\Program Files\Godot.

Compressed file downloaded
Unzip into directory

To make things easier, I usually create a shortcut on my desktop, but that is of course optional.

Create shortcut

Next, launch the Godot editor by doubleclicking the shortcut (or the.exe file directly).

Explore asset library

For now - just ignore the explore asset library popup, and click "Cancel". Next you will have to create a new project.

Click to create folder.

I store my projects in a folder called C:\dev\epos. Simply click the "Create Folder" button to prepare the with the same name as the project.

Folder created, create project.

After that - click the "Create & Edit" button. The main window will appear.

Main Window

Configure the Godot editor

The next step is to configure the Godot editor. Go to the "Editor"\"Editor Settings" tab and adjust the options according to your preferences. You may want to change the window size, the color scheme, and the keyboard shortcuts. You can also set up a custom project template or import an existing one. For now we are just going to ignore this and just focus on creating a very basic project.

Once you have set up the initial behavior, you can begin designing and programming your game. If you are unfamiliar with programming, there is a great tutorial available on the Godot website. In it, you will learn the basics of the scripting language and how to create more complex games.

Never mind, just go ahead

For our first and very basic project however, we just want to display the text "Hello World!" in the center of the screen. Start with creating a simple 2D Scene by clicking the text on the left. This will create a Node2D. Right-click on that Node2D and select "+ Add Child Node". Search for RichTextLabel and click the Create button. Highlight the new RichTextLabel node and add some text on the right panel. Next drag the text to the center of the node_2d main window.

Main Window

When that is done we are ready to build and run this basic project. To do this, either click the "Run Project" button (the play icon in the top menu, or press the "F5" key).

Main Window

The game engine needs us to select a main scene. I just selected the one existing node and saved.

Main Window

After that - the build was successful and later the a window opened up with the text as expected.

Main Window

And thats it

Congratulations, you have successfully installed Godot and created your first project! This is probably not the most optimal or fancy way of doing this, but for a very first project - this will do. The next project will be a bit more detailed when it comes to folder structure and scenes. I'm thinking about creating a very basic PONG clone, but let's wee what happens.

This article should have given you enough of an introduction to get started playing around with the engine and creating your own games. Have fun!