Programming from Zero — GDScript Fundamentals¶
What this is. The starting point of a four-book Godot learning library, for someone who has never written code. It teaches the ideas of programming — values, variables, types, decisions, loops, functions, collections, objects — from the ground up. It teaches them in GDScript, the language used by every book above it, so nothing you learn here has to be unlearned later.
By the last chapter you will own exactly the concepts the next book, Foundations, assumes you already have. You will not be a Godot developer yet — you will be a programmer who is ready to learn Godot.
The four books, and where this one sits¶
The library is a ladder. Each rung assumes the one below it:
| Tier | Book | For | Teaches |
|---|---|---|---|
| 1 | Programming from Zero (this book) | Never coded | The ideas of programming, in GDScript |
| 2 | Foundations — GDScript & Godot 2D | Can code, new to Godot | The GDScript/Godot specifics and the engine |
| 3 | Emberdelve (ARPG) | Ready to build | An action-RPG core loop |
| 3 | Blood Knight Grove (Idle) | Ready to build | An idle game |
If you have programmed before in any language — if you know what a variable, a loop, and a function are — you can skip this book and start at Foundations. If those words are unfamiliar, you are in the right place; start at Chapter P1.1.
What this book teaches, and what Foundations teaches¶
This book and Foundations both use GDScript, and both cover var, if, for, func, and classes.
They are not the same book and do not repeat each other — they sit at different altitudes:
- This book teaches the concept. What a variable is and why you would want one, slowly, with full examples, for someone seeing it for the first time.
- Foundations teaches the specifics. You already understand variables — here is how GDScript's type system, value-versus-reference rules, and the Godot engine treat them, quickly, for someone who owns the concept.
So when you meet for again in Foundations, it is not a repeat: it is the same idea seen a second
time (which is how things stick) plus the details this book deliberately left out. Concept here,
specifics there.
Who this is for¶
- Someone who has never programmed, or has only copied code without understanding it.
- An adult learner: the book leads with why each idea exists before how to write it, and never talks down to you. It is dense and plain, not padded and not babyish — programming is genuinely challenging, and the book respects that.
You do not need any prior coding, math beyond arithmetic, or Godot experience.
How the book is structured¶
Each chapter follows the same shape: What you'll learn → How it applies (why the idea matters in real programs) → Concepts with worked examples → Walkthrough you perform yourself → a self-check quiz (answers hidden behind reveals) → an integration question → a glossary (hover any defined term). You will type every example yourself, because typing — not reading — is how code becomes yours.
The modules¶
| Module | What it covers |
|---|---|
| P1 Thinking in Code | Running a program, values & variables, types, operators, decisions, loops |
| P2 Building Blocks | Functions, collections, objects, debugging, and how to think like a programmer |
What you'll be ready for (the hand-off)¶
"Ready for Foundations" is a real, checkable claim. Every concept Foundations assumes from its first page is taught here first:
| Foundations chapter assumes… | Taught here in |
|---|---|
| L1.2 — typed variables | P1.2 Values & variables, P1.3 Types |
| L1.3 — control flow | P1.4 Operators, P1.5 Decisions, P1.6 Loops |
| L1.4 — functions | P2.1 Functions |
| L1.5 — collections | P2.2 Lists & collections |
| L2.1 — classes & objects | P2.3 Thinking in objects |
| L2.4 — errors & debugging | P2.4 Errors, bugs & the debugging mindset |
The capstone (P2.5) closes with this map and a clean hand-off into Foundations.
Prerequisites¶
- Godot 4.6 installed (free, from godotengine.org). You will run small scripts in it — you are not building a game in this book, just learning to write code.
- A computer and a willingness to type things out and get errors. Errors are not failure; P2.4 is about exactly that.
Begin with P1.1 — What a program is, and running one in the sidebar.