Appendix B: Godot Environment Setup
This appendix walks you from "I have a computer" to "I have a Godot project, version-controlled, with a working export, ready to build a game." Chapter 3 covers the minimum viable setup — enough to make a character move on screen. This is the fuller version: everything you will eventually need, with the caveats and sharp edges called out.
Godot is not Unity and it is not Unreal. If you are coming from either, unlearn their assumptions. Godot does not require you to compile C++. Godot does not lock you into a marketplace. Godot does not phone home. The editor is a Godot project itself, which is a fact that sounds cute until you realize it means every weird Godot behavior is reproducible and debuggable because the source is right there.
Everything below assumes Godot 4.x. If you are on 4.0, upgrade to 4.3+ — the gains in stability and performance are substantial and there are no breaking changes worth worrying about for a beginner project.
What You Need (and What You Don't)
You need: a computer made in the last decade, about 1 GB of free disk space to start, an internet connection for the first download, and thirty minutes.
You do not need: Visual Studio, the C++ toolchain, Xcode, Android Studio, a paid license, a Unity/Unreal account, the Epic Games Store, or a dedicated GPU (though 3D runs better with one).
You will eventually need (for exports): export templates (downloaded free from inside the editor), and for iOS/macOS signing, an Apple Developer account. For Android Play Store publishing, a Google Play Console account. For console publishing, a formal developer relationship with Nintendo / Sony / Microsoft, which is a separate and involved process. None of this is required to build and test a game on your own machine.
If you want to write C# instead of GDScript, you need the .NET SDK (9.0 or whatever is current). For this book, and for most indie projects, GDScript is the right choice — faster to iterate, better integrated with the editor, and plenty fast for a 2D action-adventure.
System Requirements
Godot's requirements are genuinely modest. A cheap laptop from five years ago runs the editor comfortably.
| Resource | Minimum | Comfortable | Recommended (3D / Large Projects) |
|---|---|---|---|
| RAM | 4 GB | 8 GB | 16 GB+ |
| Disk (Godot) | 100 MB | 500 MB | 500 MB |
| Disk (per project) | 50 MB | ~500 MB | 5 GB+ |
| CPU | Dual-core | Quad-core | Modern 6-core+ |
| GPU | Integrated | Discrete | Dedicated VRAM 4 GB+ |
| Display | 1280×720 | 1920×1080 | 1920×1080+ |
OS support: Windows 10 or later, macOS 11 (Big Sur) or later, Linux (any modern distro — AppImage or distro package). There is also a browser-based editor at editor.godotengine.org — surprisingly usable, good for a Chromebook student or a quick test on a machine you cannot install software on.
If you are working in 3D or with large tilemaps, 16 GB of RAM is the difference between a smooth editor and occasional swap-to-disk stalls. For the 2D action-adventure this book builds, 8 GB is fine.
Installing Godot
There are several ways to get Godot. They are all legitimate. Choose one.
Option 1: Official Download (Recommended)
Go to godotengine.org/download. You will see four download variants per platform:
- Standard — GDScript only. Smaller download, faster startup. Use this for this book.
- .NET — Adds C# support. Larger download, requires .NET SDK.
- Forward+ / Compatibility — These are rendering options chosen per project, not per editor. The editor supports both.
The download is a single executable. On Windows, it is an .exe. On macOS, a .dmg. On Linux, an AppImage or .zip. Unzip and run — that is the installation.
Godot is portable by default. You can carry a copy on a USB stick. Configuration is stored alongside the executable (or in the OS user directory, depending on a toggle).
Option 2: Steam
Godot is on Steam as a free "app." Benefits: auto-updates, easy install. Drawbacks: Steam must be running. Fine for hobby use; I would not depend on it for a commercial project.
Option 3: Package Manager (Linux)
Most distros have Godot in their repos:
# Ubuntu / Debian
sudo apt install godot
# Fedora
sudo dnf install godot
# Arch
sudo pacman -S godot
The repo version is often one release behind. If you need current, download from the official site or use the Flatpak / Snap.
Version Selection
Godot's release model: stable releases every few months, plus long-term stable branches. At time of writing, 4.3 is stable. Pick a stable release and stick with it for the duration of a project — never upgrade Godot mid-project unless there is a specific bug fix you need. Upgrading 4.3 → 4.4 is usually painless, but "usually painless" is not what you want to discover two weeks before launch.
Creating Your First Project
Launch Godot. You will see the Project Manager — a list of projects (empty at first) plus + New Project and Import.
Click New Project. Fill in:
- Project Name: Something specific. Not "New Project." This becomes the default window title.
- Project Path: A folder. Use a clean new folder — Godot creates several hidden files in it.
- Renderer: Three choices. For a 2D game, pick Compatibility or Mobile. For a 3D game with modern visuals, pick Forward+. If you do not know, pick Compatibility — it runs on the widest hardware and produces the fewest surprises.
- Version Control: Godot can initialize Git for you. Check this box.
Click Create & Edit. The editor opens.
Renderer Quick Reference
| Renderer | Best For | Notes |
|---|---|---|
| Forward+ | Modern 3D, advanced lighting | Requires Vulkan/Metal, dedicated GPU recommended |
| Mobile | Mobile 3D, lower-end hardware | Simpler shaders, fewer advanced features |
| Compatibility | 2D games, older hardware, web | OpenGL 3.3 / GLES3 — works nearly everywhere |
Changing the renderer later is possible but regenerates some import settings. Pick carefully up front.
Initial Project Settings
Open Project → Project Settings. Set these immediately:
Display → Window
- Viewport Width / Height: Your target resolution. For 2D pixel art, something like 640×360 is a good internal resolution, upscaled to 1920×1080 by the stretch mode. For HD 2D, 1920×1080 native.
- Stretch Mode: canvas_items for most 2D games, viewport for pixel-perfect pixel art.
- Stretch Aspect: keep to preserve aspect ratio with letterboxing.
Rendering → Environment → Defaults - Default Clear Color: Whatever matches your game's sky / background. Fewer surprises during development.
Input Map
- Define your actions now. Even if you do not know every button, define: ui_accept, ui_cancel, ui_left, ui_right, ui_up, ui_down (these are the defaults for menus), plus move_left, move_right, move_up, move_down, jump, attack, interact, pause. Map each to a keyboard key AND a gamepad button. Keyboard + gamepad from day one saves refactoring later.
Editor Tour
The Godot editor is aggressively modular. Every panel can be moved, docked, or hidden.
Figure B.1: The Godot editor's default layout. The screen divides into five zones:
- Top: main menu (File/Edit/Project/Debug/Help), workspace tabs (2D / 3D / Script / AssetLib), and play/stop buttons.
- Left dock: FileSystem (your project's asset tree) and the Scene dock (the node tree of the currently open scene).
- Center: the 2D or 3D viewport, showing the current scene.
- Right dock: Inspector (properties of the selected node) and Node panel (signals and groups).
- Bottom: Output (print statements), Debugger, Animation editor, and a Shader panel when relevant.
FileSystem dock (bottom-left). Your project's assets. Right-click to create scripts, scenes, folders. Drag-and-drop to move. Rename here, not in the OS file explorer — Godot updates references automatically when you rename through the editor.
Scene dock (top-left). The node tree of the currently open scene. Select a node to edit it. Right-click for the "Add Child Node" dialog — search is fast, use it constantly.
Inspector (right). Every exported property of the selected node. Collapsible categories. Hover for tooltips. This is where you tune gameplay feel without code.
Script editor. A separate workspace (click Script at the top). Integrated debugger, breakpoints, autocomplete. Not as slick as VSCode but it knows Godot's types and signals cold.
Remote tree (Debugger tab during play). While your game is running, you can inspect the live scene tree — see positions of every node, change values at runtime, watch signal connections. Underused. Learn it.
Output panel. Print statements land here. Errors too. If something is not working, look here first.
Essential Editor Settings
Open Editor → Editor Settings. These settings are per-user, not per-project. Set once, forget.
- Interface → Theme: Dark is default and correct. Your eyes will thank you.
- Text Editor → Behavior → Indentation: Tabs. Size 4. This is the Godot convention — GDScript files enforce tabs and mixing spaces causes import errors.
- Network → Script Editor → Auto-reload Scripts on External Change: Enable. You will edit scripts externally (VSCode, Cursor) and you want the editor to pick up changes immediately.
- Text Editor → External: If you want to use VSCode / Cursor / Neovim as your primary editor, set the path to the executable and the launch arguments here. See "External Editor" below.
- FileSystem → On Save → Safe Save: Enable. Writes to a temp file and renames, avoiding corruption if the editor crashes mid-save.
Version Control
Every project — every one, including the prototype you will throw away — goes in Git. This is non-negotiable. A game project is hundreds of text files (scenes, scripts, resources). When you break something, you need a clean way back.
If you ticked "Version Control" when creating the project, Godot initialized Git for you. Otherwise:
cd your-project-folder
git init
.gitignore for Godot
Godot projects have specific "do not commit" files. Start with this .gitignore:
# Godot 4+ specific
.godot/
.import/
# Godot per-project config (imports, derived)
export.cfg
export_presets.cfg
.vs/
# OS / Editor cruft
.DS_Store
Thumbs.db
*.swp
*~
# Build artifacts
build/
exports/
*.tmp
export_presets.cfg is sometimes committed — it contains your export preset names and paths. If your signing credentials are in it, keep it out of Git. Make a sanitized template instead. .godot/ is regenerated automatically and is machine-specific; never commit it.
Binary Assets and Git LFS
Git handles text well and binaries poorly. For a game, your art, audio, and 3D assets are binary. Two options:
- Small project: commit binaries directly. Up to a few hundred MB, Git handles it fine.
- Large project: use Git LFS (Large File Storage) for anything over ~1 MB per file.
git lfs install
git lfs track "*.png" "*.wav" "*.ogg" "*.glb" "*.blend" "*.psd"
git add .gitattributes
LFS keeps your repo fast and your history small, at the cost of a plugin and slightly slower pushes.
GitHub / GitLab / Self-Hosted
Any Git host works. GitHub is the default. Create an empty repo on the web, then:
git remote add origin https://github.com/you/your-game.git
git branch -M main
git push -u origin main
Branch strategy for solo devs: main stays playable. Experimental stuff goes on branches. Merge when it works. Simple.
Team strategy: feature branches, pull requests, code review. Configure GitHub Actions to run Godot in --headless --editor --quit mode as a sanity-check on every push (catches scripts that fail to parse).
External Editor (Optional)
The built-in script editor is fine. For larger projects and serious debugging, most people switch to VSCode or Cursor.
VSCode Setup
- Install VSCode.
- Install the godot-tools extension (search
geequlim.godot-toolsin the Extensions panel). - In Godot: Editor → Editor Settings → Text Editor → External → Use External Editor → On.
- Set the Exec Path to the VSCode executable and the Exec Flags to
{project} --goto {file}:{line}:{col}. - In VSCode: open the project folder. Press F1 → Godot Tools: Open Workspace with Godot Editor to link the two.
With this setup, double-clicking a script in Godot opens it in VSCode. Debugging works via the LSP — you can set breakpoints in VSCode and run the game from Godot, and execution pauses in VSCode.
Cursor / Neovim
Cursor uses the same VSCode extension; setup is identical. For Neovim, use habamax/vim-godot or the LSP client of your choice pointed at Godot's language server (enabled by default, port 6005).
Debugger Attach
To debug, set gdscript_debugger_agent_port in Godot's editor settings matches the debugger port in your IDE. Start the game from the IDE with its debug launcher, not from Godot. Breakpoints hit. Variables inspect. Standard stuff, but knowing it works saves you a day of frustrated printf-ing.
Asset Pipeline
Every file you drop into the project folder is auto-imported by Godot. Importing means Godot processes the asset into an internal format and generates a .import file with reimport settings.
Images
PNG, JPG, WebP, SVG. Select the file in FileSystem, look at the Import dock:
- Compress Mode:
VRAM Compressedfor 3D textures,Losslessfor 2D pixel art (pixel art must not be compressed or you get bleeding). - Fix Alpha Border: Enable for transparent sprites — prevents edge artifacts.
- Mipmaps: Off for 2D, on for 3D.
- Filter: Off (nearest-neighbor) for pixel art, on (linear) for HD art.
Click Reimport after changing settings. Changes affect every scene using the asset.
Audio
WAV, OGG, MP3. Recommendations:
- Short SFX: WAV or OGG, uncompressed.
- Music: OGG with looping markers embedded.
- Voice: OGG, medium quality.
Select audio → Import dock → Loop checkbox for music. The loop mode and loop offset can be set here.
MP3 works but the OGG codec is preferred in Godot — smaller files, better looping support, no licensing anxiety.
3D Models
GLTF 2.0 (.gltf / .glb) is the recommended format. Blender exports it natively. The importer turns a GLTF into a scene, which you can save as a .tscn and instance anywhere.
For Blender users: Godot 4 has direct Blender import — just drop a .blend file in. This requires Blender installed and the path set in Editor Settings → Filesystem → Import → Blender → Blender Path.
Fonts
TTF, OTF, WOFF2. Drop into the project. Create a FontVariation resource to set size, spacing, outline, etc.
For pixel fonts, use a FontFile directly and set Antialiasing to Off.
Godot CLI and Automation
The editor is not the whole engine. The godot command-line tool does everything the editor does, plus batch operations. Learn it for CI, for scripted builds, for quick one-off tasks.
# Open a project in the editor
godot --editor --path /path/to/project
# Run a project headless (no window) — useful for CI
godot --headless --path /path/to/project
# Export a release build
godot --headless --path /path/to/project --export-release "Windows Desktop" build/game.exe
# Export a debug build
godot --headless --path /path/to/project --export-debug "Linux/X11" build/game.x86_64
# Run a specific script (useful for data generation)
godot --headless --script res://tools/generate_item_db.gd
CI integration example (.github/workflows/build.yml sketch):
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Godot
run: |
wget https://github.com/godotengine/godot/releases/download/4.3-stable/Godot_v4.3-stable_linux.x86_64.zip
unzip Godot_v4.3-stable_linux.x86_64.zip
- name: Export
run: ./Godot_v4.3-stable_linux.x86_64 --headless --export-release "Linux/X11" build/game.x86_64
- uses: actions/upload-artifact@v4
with:
name: linux-build
path: build/
Set this up before you need it. When you do need it — for a demo build the day before a deadline — you will not have time to figure it out.
Debugging
Godot's debugging toolkit is solid. Use all of it.
Print statements:
print("hp = ", hp)
print_debug("with file+line info")
printerr("error, goes to stderr and shows in the debugger")
Breakpoints. In the script editor, click the gutter to the left of a line number. Run the game. Execution pauses when the breakpoint hits. You can step over, step into, inspect variables, evaluate expressions. The debugger panel docks at the bottom of the editor.
Remote scene inspector. Debugger panel → Remote tab while the game is running. You see the live node tree. Click a node, the Inspector shows its current values — and you can change them, live. Want to know why the boss is spawning at (0,0)? Run the game, select the boss node in the Remote tree, read its global_position. Done in five seconds.
Profiler. Debugger panel → Profiler tab. Records per-frame CPU time across categories (physics, rendering, audio, script). Find your hot functions here, not by guessing.
Monitor panel. Debugger → Monitors. Live graphs of memory, draw calls, object counts, FPS. Useful for detecting leaks — if your "Orphan Nodes" count climbs during play, you are not queue_free-ing something.
print_rich — pretty colored output: print_rich("[color=red]uh oh[/color]"). Useful for classifying log levels.
Export Templates
Your project runs in the editor. To run it as a standalone executable, you need export templates — pre-built engine binaries for each target platform.
Download them once per Godot version: Editor → Manage Export Templates → Download from Godot source. The file is large (~1 GB) and covers every platform.
Export Presets
Project → Export. Add a preset per target:
- Windows Desktop — produces
.exe. No signing required for side-loading; signing recommended for SmartScreen smoothness. - Linux/X11 — produces a binary. Mark it executable with
chmod +x. - macOS — produces a
.appbundle. Signing required for Gatekeeper (Apple Developer account, ~$99/year). - Android — produces an
.apkor.aab. Requires the Android SDK and a keystore for signing. Play Store upload requires.aab. - iOS — produces an Xcode project you then build in Xcode. Apple Developer account required. Significantly more involved than other platforms.
- Web — produces HTML + JS + WASM. Host on any static file host. Note: browser audio autoplay policies require a user click before sound plays.
Each preset has platform-specific options: icons, bundle IDs, supported architectures, permissions (Android / iOS), orientation lock. Read the docs for each platform; the defaults are reasonable but not optimal.
Signing
- Windows: optional, recommended. Code signing certificate from a CA (DigiCert, Sectigo, etc., ~$200-600/year). Without it, Windows SmartScreen warns the first few hundred downloaders until your reputation builds.
- macOS: required for distribution outside the Mac App Store. Apple Developer membership. Notarization step (upload to Apple, wait for automated scan).
- iOS: always required. Xcode handles most of it.
- Android: self-signing works for side-loading; Play Store wants a specific upload key configured in Play Console.
Plan for signing before launch week. The first time you set up Apple notarization is not the experience you want six hours before a deadline.
Common First-Day Problems
If your game is misbehaving and you are new to Godot, work through this checklist. It catches 80% of day-one issues.
"My script does not work at all."
- Did you save the file? The editor does not auto-save (by default).
- Is the script attached to a node? Select the node, check the Inspector — the "Script" property should point to your file.
- Does the script
extendsthe right class? A script attached to aCharacterBody2Dneedsextends CharacterBody2D(or a parent class). - Is there a parse error? Check the Output panel for red messages.
"Nothing appears on screen."
- Is the node a child of the scene root? Orphan nodes do not render.
- Is the camera enabled? In 2D, a
Camera2Dwithenabled = true(ormake_current) is required, or the viewport uses the default camera at the origin. - Is the node positioned offscreen? Check the Inspector —
positionat (100000, 100000) is a thing that happens. - Is the Sprite's
textureproperty actually set? An empty sprite is invisible. - Is
visible = true? Check the node panel — an eye icon controls it.
"My controls do not respond."
- Is the action defined in the Input Map (Project → Project Settings → Input Map)?
- Are you listening via
Input.is_action_pressed("name")with the correct name? - Are you reading input in
_processor_unhandled_input? If UI is eating the input first, try_unhandled_input. - Is another node with
mouse_filter = Stopconsuming mouse events above your handler?
"My character falls through the floor."
- Does the floor have a
CollisionShape2D/CollisionShape3Dchild with an actual shape assigned? - Are the collision layers / masks set so the character and floor can see each other?
- Is the character a
CharacterBody2Dusingmove_and_slide()(not aRigidBody2D)?
"Audio does not play."
- Is the
AudioStreamPlayerin the scene? - Did you call
.play()on it? - Is the
volume_dbturned down?0.0is normal;-80is silent. - On web: has the user clicked anywhere yet? Browsers require user interaction before audio.
"The game crashes on export but runs in the editor."
- Did you write to
res://somewhere?res://is read-only in exported builds. Useuser://instead. - Did you reference a
.gdfile that was not included in the export? Export filter settings exclude files by default — check export preset's Resources tab.
Next Steps
You have a project, a repo, an editor set up, and at least a theoretical export pipeline. Now go write some GDScript and break things.
Official resources:
- docs.godotengine.org — the official documentation. Thorough. Searchable. Bookmark it.
- godotengine.org/community — forum, Discord, Reddit links.
- github.com/godotengine/godot — source, issues. If you hit a bug, the issue tracker is often where you find the workaround.
Tutorials worth your time:
- KidsCanCode (YouTube / kidscancode.org) — Chris Bradfield's tutorials. Clear, current, opinionated in good ways.
- HeartBeast (YouTube) — Benjamin Stanley's channel. Long-form project-based tutorials. Great for platformer and RPG foundations.
- GDQuest (gdquest.com / YouTube) — Razvan Cristea's team. High production value, modern Godot 4 content, some paid courses but much is free.
- Godot Tutorials (YouTube, "Coding with Russ") — short-form, topical, good for looking up specific mechanics.
Communities:
- Godot Discord — official. Fast answers. #gdscript, #help, #showcase are the active channels.
- r/godot — general discussion, showcases, job postings. Friendly.
- Godot Forum (forum.godotengine.org) — longer threads, less real-time than Discord.
Sample projects:
- The official godotengine/godot-demo-projects repo on GitHub. Dozens of complete small projects — platformer, FPS, GUI, shader demos. Clone, open, read the code. Learning from real scenes is faster than reading docs.
You are set up. Chapter 3 of the book picks up from here and builds the first moving character. Chapter 5 adds a mechanic. Chapter 8 adds juice. By Chapter 32 you are balancing a fully-systemic game. By Chapter 40 you are shipping it.
Stop reading the setup guide. Go make something.