Godot: Lowering the Barrier to Entry of Game Dev
Published: 2024-04-21 19:00:50

Now that I am getting towards the latter third of my coding bootcamp, I have been asked a few times: "What do you want to do when you're done?" And while I feel it may be a bit early to make that kind of decision, it is certainly not too early to start considering my options. 

One that has always enticed but intimidated me was game development. I have been playing video games for essentially my whole life and game design seems to be a perfect blend of exploring my creativity and software engineering. However, any foray into the world of game design in my past has led me to back away from the prospect because of the intimidating complexity and saturated market. In recent years, with the extreme success of smaller studios starting to outclass the success of large game studios, I have begun to gain some hope that I could find some success as a smaller creator. This combined with my newly gained confidence with coding, I figured now was as good of a time as any to leap back into learning about game development, this is where I found *Godot*.

![Godot Logo Vertical](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ade5fn0ro822t5ye5gpb.png)

# What is Godot?

Godot (*pronounced "guh-doh"*) is a game engine that has gained a lot of popularity in the last couple of years. Godot makes game development accessible to anyone who wants to give development a try. There is a very low barrier to entry since the engine is free and can run on most modern systems. No need for a subscription or a beefy PC. Godot has also fostered an active and talented community because of the open source code, allowing the community to develop Godot to their needs, furthering the accessibility and functionality of the engine. I don't think I could do better than the Godot developers themselves at describing their product. Their short write-up says:

---

*Godot Engine is a feature-packed, cross-platform game engine to create 2D and 3D games from a unified interface. It provides a comprehensive set of common tools, so that users can focus on making games without having to reinvent the wheel. Games can be exported with one click to a number of platforms, including the major desktop platforms (Linux, macOS, Windows), mobile platforms (Android, iOS), as well as Web-based platforms and consoles.*

*Godot is completely free and open source under the permissive MIT license. No strings attached, no royalties, nothing. Users' games are theirs, down to the last line of engine code. Godot's development is fully independent and community-driven, empowering users to help shape their engine to match their expectations. It is supported by the Godot Foundation not-for-profit.* [Godot Docs] (https://docs.godotengine.org/en/stable/about/introduction.html#:~:text=and%20Forum.-,About%20Godot%20Engine,%C2%B6,-A%20game%20engine)

---

Now, that has a lot of jargon packed into a short space, so let's break it down before getting into the basics of Godot.

## *Godot is a feature-packed, cross-platform game engine*

Godot provides a lot of the same features that other engines like Unity or Unreal provide but trims the fat leaving only the key features that developers need. This package is wrapped up in a download that is only just over 1.4 GB, less than half of other engines. This small and efficient size allows Godot to be run on most modern systems. Godot also supports all operating systems including Linux.  

## *... to create 2D and 3D games from a unified interface.* 

Godot has one interface whether working in 2D or 3D and neither feels like it takes precedence over the other. Godot provides equally useful and intuitive tools for working with either style and concepts transfer seamlessly from developing in one to the other.

## *Games can be exported with one click to a number of platforms* 

Godot allows developers to make games for any modern platform including PC, iOS, and Android, as well as consoles like PlayStation, Xbox, and Switch. Since there is support for all these platforms, it is possible to develop a single game and export it to all these platforms with little work from the user.

## *Godot is completely free and open source*

Of the major game engines, Godot is the only completely free and open-source software. This means all the source code for the Godot engine is completely available and can be copied and edited to the needs of the developer without any paywall to access this. This allows for an expansive extension library from the Godot community that provides developers with even more tools. Godot's community is quite large and very passionate, in some ways the Godot engine feels more like a community project rather than a for-profit software.

---

# Godot Basics

Now that you have an understanding of what Godot Engine is, let's take a look inside and see how game development works in Godot.

Games are comprised of scenes made of one or more node trees. The nodes can be wired together using signals. 

## Scenes
Scenes are reusable sets of nodes that can represent any entity in the game. Characters, items, and environments are all scenes. Scenes use a root node that children and sibling nodes are added to to build out the scene. Scenes are then able to be nested to add things like the character and items to the environment.

![Godot Scene](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5chhvoqzfvvzme6uk89n.png)

## Nodes
Nodes are the building blocks of the Godot engine. Nodes join together to form scenes through relationships called trees. Nodes can be added to other nodes to provide the parent node with the functionality of the child node. For example, a basic player scene could use a `CharacterBody2D` node as the root node. To add a sprite to the player you can add a `Sprite2D` node as a child. Adding things like a collision node and camera node will add more functionality to the player allowing it to interact with other scenes with collision shapes and providing a locked camera to the player. Nodes can also have attached scripts to further enhance the node's functionality and interact with signals.

## Signals
Godot nodes use a system of signals that trigger whenever certain events occur. These signals can be used to have nodes communicate without connecting them through code. Signals can also be used to trigger code execution. For example, buttons emit signals when pressed, this can be used to trigger a code execution to exit the game, change scenes, open a menu, or any number of other actions. Other signals like collisions make coding out interactions between scenes very straightforward.

![Godot Signals Bar](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6rsq82z0itfxy5u9j09b.png)

## GDScript
Godot's purpose-built scripting language. GDScript was inspired by Python and it shows in its simple syntax and use of indentation to structure code blocks but has many differences that make it great for game development. Baked in linear algebra use, fast compilation times, and no garbage collection are a few of the features of GDScript that, in conjunction with the simple syntax and low learning curve, make GDScript a vital part of making Godot accessible to beginners

![GD Script for Player](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5jiqvi1tfxfemnib97xi.png)

# Conclusion

This is a very cursory glance at Godot engine, if this interests you at all, I strongly encourage you to take a crack at making a game. There are more than a handful of tutorials out there that can walk you through your first game. I followed [freeCodeCamp's on Youtube](https://youtu.be/S8lMTwSRoRg?si=akXoH34AOG9pUo45) that, while a little out of date, covered everything in good detail. Checkout [Godot's docs](https://godotengine.org/) if you want to read more and download the engine. 

**Happy Coding!**