Godot 4 for Absolute Beginners
Welcome
You do not need to know anything to start this book. You do not need to have written a line of code. You do not need to be good at drawing, music, or math. You need a computer, some curiosity, and a little patience with yourself.
By the last chapter you will have installed a professional game engine, learned the basics of programming, built several small games from scratch, and exported one so that a friend can play it. Along the way you will make many mistakes. That is not a sign that something is wrong. Making a mistake, reading the message, and fixing it is what programming actually is, and this book teaches that skill on purpose.
Who this book is for
This book is for you if you are:
- a college or university student taking a first course in game development or programming,
- a self-taught learner who wants a structured path instead of a pile of scattered videos,
- a teacher or mentor looking for a course that can be followed from the first page without prior knowledge,
- anyone who has said "I would love to make a game, but I do not know where to start."
It is not necessary to have used any game engine before. It is not necessary to know any programming language. Every programming idea (a variable, a function, a loop) is explained from zero, with everyday comparisons, the first time it appears.
What you will need
- A computer running Windows, macOS, or Linux that can run Godot 4. Almost any computer from the last several years will do for the 2D chapters. Chapter 19 (3D) benefits from a computer with a reasonably modern graphics chip, but the examples are small.
- An internet connection to download Godot (it is free, and roughly 100 to 200 MB).
- A mouse is strongly recommended. A keyboard is required. A gamepad is optional.
- About 3 to 6 hours per chapter if you read carefully and do the projects. Short chapters take less.
You do not need to buy anything. Every project in the book can be built with shapes, colors, and sounds that Godot itself provides. Appendix F lists free art, music, and sound if you would like to decorate your games.
How the book is organized
The book has 24 chapters in five parts, followed by seven appendices.
| Part | Chapters | What happens |
|---|---|---|
| I. Meet Godot | 1 to 5 | Install Godot, learn the editor, learn nodes and scenes, learn programming from zero. |
| II. Making 2D games | 6 to 13 | Sprites, input, movement, physics, your first complete game, animation, sound, tilemaps, a platformer. |
| III. Interfaces and game structure | 14 to 18 | Menus and user interface, signals, scene changes, autoloads, saving and loading, a complete game with title and pause screens. |
| IV. Going further | 19 to 22 | A first look at 3D, visual effects, enemy behavior, debugging, and good habits. |
| V. Finishing and sharing | 23 to 24 | Exporting your game, publishing it, and deciding what to build next. |
The appendices are for looking things up:
| Appendix | Contents |
|---|---|
| A | GDScript quick reference |
| B | Editor shortcuts |
| C | Troubleshooting guide: symptom, cause, fix |
| D | Answers to the review questions (one file per chapter) |
| E | Glossary |
| F | Free assets and tools |
| G | Math for games, just enough, with pictures |
Read in order the first time
The chapters build on one another. Chapter 4 uses ideas from Chapter 3, and the projects in Part II reuse characters and code from earlier chapters. If you are new, read in order. Later, once you know the basics, you can jump around freely.
If you already know some programming, you may skim Chapters 3 and 4, but do their projects anyway. Godot has its own way of organizing a game (nodes and scenes), and Chapter 2 is worth reading closely even for experienced programmers.
How each chapter is structured
Every chapter has the same shape, so you always know where you are.
- Learning objectives. What you will be able to do by the end. Read these first. They are the goal.
- Key terms. The new words in the chapter, each with a one-line definition. You can skim them before you start and use them as a checklist afterward.
- Numbered sections (for example 4.1, 4.2, 4.3). The lesson itself. Concepts come first, then a worked example, then a "Try it" so you can practice at once.
- The project. A hands-on build with numbered steps, usually 30 to 90 minutes. It ends with an Expected result so you can check your work.
- Chapter summary. The main points in a short list.
- Review questions. Eight to ten questions to test your understanding. Answers are in Appendix D, in a separate file for each chapter. Try the questions before you look.
- Exercises. Three to five tasks: Practice (easy), Apply (medium), and Challenge (hard). Do at least the Practice and Apply ones.
- Common mistakes. The problems most beginners run into, each written as symptom, cause, fix.
- Further reading. Links to the official Godot documentation for going deeper.
Conventions used in this book
Code
Code appears in shaded blocks. The block is labeled with the language:
extends Node2D
func _ready() -> void:
print("Hello, Godot!")
Before each script, the text tells you three things: the file name, the node type the script attaches to, and the scene tree it lives in. Scene trees are drawn like this:
Main (Node2D)
├── Player (CharacterBody2D)
│ ├── Sprite2D
│ └── CollisionShape2D
└── Label
Terminal commands are labeled bash:
godot --version
GDScript uses the Tab key for indentation. The code blocks in this book use tabs. If you type the code yourself, the Godot script editor will insert tabs for you. If you copy and paste, keep the indentation exactly as shown. Indentation is part of the language, not decoration.
A piece of code that is not complete on its own is called a fragment, and the text says where it goes.
Names
Monospace textis for code, file names, node names, property names, and anything you type or see literally in the editor.- Bold text marks a key term the first time it is defined.
- Italic text is for emphasis, titles, and menu paths written like Project > Project Settings.
- Keyboard keys are written like Ctrl+S. On macOS, Ctrl usually becomes Cmd. Appendix B lists the differences.
Callouts
Short boxes break up the text:
Note: Extra information that is useful but not essential.
Warning: Something that commonly goes wrong, or that can lose your work.
Why it works: A short explanation of what is happening underneath.
Try it: A small activity. Stop reading and do it. This is where learning happens.
Figures
Figures are numbered by chapter: Figure 7.2 is the second figure in Chapter 7. Diagrams explain ideas. Screenshots show the real Godot editor or a running game. The editor's default dark theme is used throughout. Your editor may look slightly different if you have changed its theme, language, or window layout.
Versions
The book is written for Godot 4.7. Godot 4 releases are designed to stay compatible with one another, so everything here works on 4.4 and later. If a feature exists only in newer versions, the text says so. This book uses GDScript only. It does not use the C# edition of Godot.
Warning: Many tutorials online were written for Godot 3. Godot 3 and Godot 4 are different. If you copy code from an old tutorial and it fails, check whether it uses names such as
KinematicBody2D,Sprite,yield,onready, orexport var. Those are Godot 3. Appendix C explains how to translate them.
Optional: the finished projects
You do not need any files to follow this book. Every chapter gives every step, and you build each project yourself.
For each chapter there is also a finished, ready-to-open Godot project, one folder per chapter, named with the chapter number and a short label (for example ch09-coin-dash). If you have these optional files, you can use them to check your work when something does not behave as described, or to see the finished result before you start.
To open one:
- Open Godot. In the Project Manager, choose Import.
- Browse to the folder of the project you want and select its
project.godotfile. - Click Import & Edit.
Each project opens on its own and does not depend on any other.
Try it: Do your own build first. When you are stuck, compare your project to the finished one. Looking at a working project beside a broken one is one of the best ways to learn what each part does.
A note on Godot's license and name
Godot Engine is free and open-source software, released under the MIT License. That is a very permissive license. In plain words: you may use Godot for any purpose, including commercial games, you do not pay royalties or fees, and the games you make belong to you. The only requirement is that the license text and copyright notice for Godot are included with distributed copies of the engine. Godot's editor provides these in its Help > About Godot window, and when you export a game you can include them in your credits or a licenses file. Chapter 23 shows how.
Godot also includes a number of third-party libraries, each with its own license. Those are all listed in the same About window.
"Godot" and the Godot logo are trademarks of the Godot Foundation. The MIT License covers the engine's code, not the name and logo, so this book uses them only to refer to the engine, and does not imply any endorsement. If you publish your own tools, courses, or products, check the Godot Foundation's trademark policy on the official website before using the name or logo in a way that could suggest official approval.
This is general information, not legal advice.
A word before you begin
Some chapters will feel easy. Some will feel hard. Both are normal. If a section does not make sense, read it again later, or do the "Try it" first and read the explanation afterward. If your code does not work, do not worry: Appendix C exists for exactly that moment, and Chapter 22 teaches you to find problems yourself.
Take breaks. Save often. Keep every project you make, because many of them become the starting point for the next.
Now turn the page. Chapter 1 begins with a simple question: what is a game engine?
Prefer to read offline? PDF (21 MB) · EPUB (5 MB)