Godot 4 games on Windows: typed, hand-edited, headless
A Godot project is text a session can read and write: project.godot,
scenes (.tscn), resources (.tres) and GDScript (.gd). This skill
covers what goes wrong when it is worked from files and a terminal
instead of the editor: a second editor version rewriting files, an
untyped script nothing flags, a hand edit the next save discards, blurry
pixel art, a headless run before import, and an export with no
template.
Dated, and drilled on 2026-11-16 from the Godot docs
(godotengine/godot-docs branch 4.7 at 9adca4c), the engine's source
and class reference at 4.7.2-stable, the 4.7.2 release's Windows
editor zip, and GodotSteam's docs (godotsteam/godotsteam-docs master
at 35d8f32, on Codeberg). Past references/, the docs' source,
curl -s https://raw.githubusercontent.com/godotengine/godot-docs/4.7/<path>.rst
(the branch named for the project's minor version), the class reference
and engine source at godotengine/godot/4.7.2-stable/ on the same host,
as doc/classes/<Class>.xml, and GodotSteam's at
curl -s https://codeberg.org/godotsteam/godotsteam-docs/raw/branch/master/docs/<path>.md.
A live page that contradicts a line here wins: say so, act on the page,
and route the fix by capture-learning where it is installed, else tell
the user, bar a dated measured line that
names the page it overrules and the call that measured it, which a page
changed since its date sends back to re-measure. An observed claim is
cited or marked pending a doc check, and stands, marked observed, only
where no page covers it.
Not here. Godot 3 and its GDScript; C# and the .NET build; building
the engine or GodotSteam from source; 3D, physics, animation, audio,
input, UI themes and shaders; export to anything but Windows; test
frameworks; GDScript's naming, code order and typing style beyond the
typing setting in § 3, which follow Godot's own GDScript style guide.
Detail lives in references/: scene-format.md (the .tscn and
.tres grammar, section by section, with examples from the docs) and
steam.md (GodotSteam's builds, initializing, callbacks, export and
the files to ship). Each cites its source.
1. Pin one editor version
Pin the exact editor, 4.7.2 and not 4.7, for the whole project,
and write it in the repo's CLAUDE.md or README. Every session and
every collaborator then opens the files with the same binary. A
different one changes them:
- A newer editor rewrites what it saves. On save it rewrites
application/config/features in project.godot to its own version
branch, such as 4.7, and its rendering method, and drops features it
does not support (core/config/project_settings.cpp at
4.7.2-stable, read 2026-11-16). A scene saved by 4.6 or later gains
a unique_id= on every node, and load_steps is gone from its
header (tscn.rst, read 2026-11-16). One open-and-save in another
version is a diff in every file it touched.
- An older 4.x editor downgrades the project.
config_version has
been 5 since 4.0, so no 4.x editor refuses a 4.x project. The project
manager warns "This project was last edited in Godot 4.7. Opening will
change it to Godot 4.6." and asks "Open anyway? Project will be
modified." (core/config/project_settings.h and
editor/project_manager/project_manager.cpp at 4.7.2-stable, read
2026-11-16). Opened directly, -e --path ., it asks nothing and
saves project.godot as it opens, unless headless, trimming
config/features to its own version: every 4.x editor from
4.0-stable to 4.7.2-stable does (editor/editor_node.cpp and
core/config/project_settings.cpp, read 2026-11-16). Only an engine
with a lower config_version refuses: "is from a more recent and
incompatible version of the engine" (project_settings.cpp, read
2026-11-16).
- Export templates are per exact version (§ 9).
Use the console build from a terminal. The Windows editor zip holds
two binaries, Godot_v4.7.2-stable_win64.exe and
Godot_v4.7.2-stable_win64_console.exe, a 198 KB wrapper (observed
2026-11-16, the 4.7.2 release's win64.exe.zip). Output sent to the
terminal is seen on Windows only through the console.exe
(@GlobalScope reference, printraw, read 2026-11-16). Point a variable
at it once, $godot = '<dir>\Godot_v4.7.2-stable_win64_console.exe',
and the commands below use it.
2. What git keeps
- Ignore
.godot/, "various project cache data", and
*.translation, binary imports generated from CSV
(version_control_systems.rst, read 2026-11-16).
- Let the editor write
.gitignore and .gitattributes: the
project manager's Git option, or Project > Version Control > Generate
Version Control Metadata. Its .gitattributes holds every file to LF,
as the style guide asks of scripts; without it, set core.autocrlf input on Windows (version_control_systems.rst, read 2026-11-16).
- Commit the
.uid files. Since 4.4 Godot writes <file>.uid
beside each script and shader, holding its uid:// id. A script or
shader moved outside Godot takes its .uid with it, or every
reference by uid:// breaks (Godot blog, "UID changes coming to Godot
4.4", read 2026-11-16). A git mv of player.gd is two moves.
- Commit
export_presets.cfg; .godot/export_credentials.cfg
holds secrets and stays out (exporting_projects.rst, read 2026-11-16).
3. Static typing, enforced
Typed GDScript's warnings are off by default (static_typing.rst,
read 2026-11-16), so an untyped declaration parses, runs and is never
flagged. Turn the check on in project.godot:
[debug]
gdscript/warnings/untyped_declaration=1
- The level is 0, 1 or 2: ignore, warn, error
(
modules/gdscript/gdscript_warning.h, read 2026-11-16). At 1 the
editor and a run report "a variable or parameter has no static type,
or … a function has no static return type"; at 2 it is an error
(ProjectSettings reference, read 2026-11-16). Take 2 where a headless
run must fail on it.
- Leave
inferred_declaration at 0. It flags :=, which the style
guide prefers where the type is written on the same line
(gdscript_styleguide.rst, read 2026-11-16).
- The
unsafe_* warnings (unsafe_property_access,
unsafe_method_access, unsafe_cast, unsafe_call_argument, each 0
by default) "do not cover all cases that unsafe lines cover"
(static_typing.rst, read 2026-11-16): turn them on for more, never
as proof.
addons/ is exempt by default, through
debug/gdscript/warnings/directory_rules, { "res://addons": 0 },
which the reference says not to remove (ProjectSettings reference,
read 2026-11-16): a plugin's untyped code does not fail the project.
- Silence one line, not the setting:
@warning_ignore("untyped_declaration")
above it, the names matching the settings' (warning_system.rst, read
2026-11-16).
project.godot is INI: the first part of a setting's path is the
[section], the rest the key, and a setting at its default is not
written (project_settings.cpp, read 2026-11-16). The docs recommend
the Project Settings window over a hand edit (project_settings.rst,
read 2026-11-16).
4. Scenes and resources by hand
A hand edit is fine if it keeps the format's rules; the grammar is
in references/scene-format.md. The ones a hand edit breaks:
- Five sections, in order: the
[gd_scene] or [gd_resource]
header, [ext_resource]s, [sub_resource]s, [node]s,
[connection]s. A sub-resource must come after any it refers to:
the loader fails on a SubResource id it has not read yet
(resource_format_text.cpp, read 2026-11-16).
- Exactly one root node, with no
parent; its children take
parent=".", deeper ones the path below the root, parent="Arm/Hand",
never the root's name.
id is local to the file and referenced as ExtResource("<id>")
or SubResource("<id>"); a new one needs only to be unique among its
kind. uid is global: copy it from the target's header or its
.uid file, never invent one, or leave it out, as the docs' own
.tres example does.
- A property at its default is not stored, and
; comments are
dropped: write either and the next save from the editor removes it.
unique_id on a node is the editor's to write; a hand-added node
without one is valid, as every pre-4.6 scene is.
All from tscn.rst, read 2026-11-16. Open the scene in the pinned
editor, or run it headless (§ 8), after a hand edit: a typo shows up
there, not in git.
5. Signals and autoloads
- Connect in code with
Signal.connect,
timer.timeout.connect(_on_timer_timeout), and emit with
health_changed.emit(old, new); the reference recommends
Signal.connect over Object.connect in GDScript (Object reference,
read 2026-11-16). The callback's name is _on_<node_name>_<signal>
by convention (signals.rst, read 2026-11-16).
- Connecting the same callable twice is an error,
ERR_INVALID_PARAMETER, unless it was connected
CONNECT_REFERENCE_COUNTED: check is_connected first where a
connect can run twice (Object reference, read 2026-11-16).
- The editor's Signals dock writes a
[connection] line into the
.tscn and generates the callback only in its own script editor;
with an external editor, connect in code (signals.rst, read
2026-11-16). A hand-written [connection signal="pressed" from="Button" to="." method="_on_button_pressed"] loads with the
editor's default flag (resource_format_text.cpp, read 2026-11-16).
- Design a scene to need nothing outside itself; where it must, its
parent wires it, and a signal is for responding to behavior, not
starting it (scene_organization.rst, read 2026-11-16).
- An autoload is for a system that tracks its own data, is needed
globally and stands alone; systems that change others' data are
their own scenes (scene_organization.rst, read 2026-11-16). It is
registered in
project.godot as [autoload] Name="*res://path.gd",
the * making it a global singleton (project_settings.cpp, read
2026-11-16).
6. Pixel art
The docs' recipe for pixel art (multiple_resolutions.rst, read
2026-11-16) sets the [display] lines and gives the quoted reasons;
the [rendering] two, and the rest of each setting's meaning, are from
the ProjectSettings reference (read 2026-11-16), Nearest being this
skill's choice, not a page's:
[display]
window/size/viewport_width=640
window/size/viewport_height=360
window/stretch/mode="viewport"
window/stretch/aspect="keep"
window/stretch/scale_mode="integer"
[rendering]
textures/canvas_textures/default_texture_filter=0
2d/snap/snap_2d_transforms_to_pixel=true
- The viewport size is the art's resolution. 640×360 "scales to
1280×720, 1920×1080, 2560×1440, and 3840×2160 without any black bars
when using integer scaling". Set
window_width_override and
window_height_override for a bigger window while developing.
mode="viewport" renders at that size and scales the result,
"recommended for games that use a pixel art aesthetic"; the default
is disabled. A project created in 4.7 starts at canvas_items
and expand (upgrading_to_godot_4.7.rst, read 2026-11-16), so its
project.godot already names a mode: change it. canvas_items suits
art that may move by sub-pixels.
aspect="keep" holds one aspect ratio, with black bars; the
recipe allows expand only with Controls anchored to fit.
scale_mode="integer" scales by whole multiples only. A window
smaller than the viewport then clips it: set Window.min_size. Use
Exclusive Fullscreen, since plain Fullscreen's one-pixel line "can
cause integer scaling to use a smaller scale factor than expected".
default_texture_filter=0 is Nearest, against the default 1,
Linear.
snap_2d_transforms_to_pixel rounds each CanvasItem's
position, "useful for low-resolution pixel art games", at the cost of
smoothness, worst with Camera2D smoothing; it is read only at start,
and not to be paired with snap_2d_vertices_to_pixel.
7. TileMapLayer, not TileMap
TileMap is deprecated since 4.3: each layer is its own
TileMapLayer node (upgrading_to_godot_4.3.rst; TileMap reference;
read 2026-11-16). Migrate an old one in the editor: with the node
selected, open the TileMap bottom panel, click the toolbox icon in its
top-right corner and choose "Extract TileMap layers as individual
TileMapLayer nodes".
- Save the
TileSet as its own .tres to share it between layers
and scenes (using_tilemaps.rst, read 2026-11-16).
- Coordinates are 16-bit signed, −32768 to 32767, and changes are
batched to the end of the frame: call
update_internals() where code
needs them sooner (TileMapLayer reference, read 2026-11-16). Set a
cell in code with set_cell(coords, source_id, atlas_coords).
- Since 4.5 physics is chunked by default, which changes what
get_coords_for_body_rid() returns; physics_quadrant_size = 1
restores one body per cell (upgrading_to_godot_4.5.rst, read
2026-11-16).
8. Headless on Windows
Import before anything else in a fresh clone. .godot/ is not in
git, so nothing is imported yet; --import "starts the editor, waits
for any resources to be imported, and then quits" (command_line_tutorial.rst,
read 2026-11-16):
& $godot --headless --path . --import
--headless is --display-driver headless --audio-driver Dummy.
A smoke test is a script that extends SceneTree (or MainLoop),
run by --script; --check-only with it parses and quits
(command_line_tutorial.rst, read 2026-11-16). _initialize() runs
once at start (MainLoop reference, read 2026-11-16); this script is
built from the references, not run here:
extends SceneTree
func _initialize() -> void:
var scene: PackedScene = load("res://main.tscn")
if scene == null:
push_error("res://main.tscn failed to load")
quit(1)
return
root.add_child(scene.instantiate())
quit(0)
& $godot --headless --path . --script res://tests/smoke.gd
$LASTEXITCODE
quit(exit_code) sets the process's exit code, applied at the
end of the frame; keep it within 0 to 125 for portability (SceneTree
reference, read 2026-11-16). Quit non-zero on every failure the test
finds.
- Whether the console wrapper passes the exit code through is
unchecked, pending a doc check or a run: before trusting
$LASTEXITCODE, run a script that calls quit(3) once on the pinned
version and read 3 back.
- The binary must be the editor, not an export template, for
--import and the exports below (command_line_tutorial.rst, read
2026-11-16).
9. Export
Install the templates for the exact version: Editor > Manage
Export Templates, or a downloaded .tpz (exporting_projects.rst, read
2026-11-16). They are looked up under a folder named for the full
version, so an editor update without its templates fails with "No
export template found at the expected path:"
(editor/export/editor_export_platform.cpp, read 2026-11-16).
Export from the command line by the preset's name in
export_presets.cfg:
New-Item -ItemType Directory -Force build\windows | Out-Null
& $godot --headless --path . --export-release '<preset name>' build/windows/game.exe
The target directory must exist, and a relative path is relative to
the project, not the current directory; --export-debug and
--export-pack work alike, and each implies --import
(command_line_tutorial.rst, read 2026-11-16).
Windows packs the project into a .pck beside the .exe, which
the page calls data.pck, unless the preset embeds it, up to about
3.89 GB in all; debug/export_console_wrapper adds the console wrapper
for a build that prints to a terminal; signing reads
GODOT_WINDOWS_CODESIGN_IDENTITY_TYPE,
GODOT_WINDOWS_CODESIGN_IDENTITY and
GODOT_WINDOWS_CODESIGN_PASSWORD (exporting_for_windows.rst and the
EditorExportPlatformWindows reference, read 2026-11-16).
A file or folder whose name starts with a period is never
exported (exporting_projects.rst, read 2026-11-16).
10. Steam through GodotSteam
Detail and sources in references/steam.md. In short:
- The GDExtension build is an addon in
addons/godotsteam/, needs
no enabling, and exports with the regular Godot templates, never
GodotSteam's; the pre-compiled build is GodotSteam's own editor and
templates instead.
- Ship
steam_api64.dll and the GodotSteam library beside the
.exe; never ship steam_appid.txt.
- In development, app ID 480, Valve's SpaceWar, set under Steam >
Initialization in the project settings or passed to
steamInitEx().
Steam.run_callbacks() every frame in an autoload that never
pauses: an autoload is a child of the root, which is Pausable, so
give it process_mode = PROCESS_MODE_ALWAYS.
11. Constraints
- One pinned editor version, named in the repo; never open the
project in another.
- Typed GDScript, and the warning on to hold it so.
- Never invent a
uid://; never move a script without its .uid.
- Never trust
$LASTEXITCODE from the console build until § 8's
check has passed on the pinned version.
- No Godot 3 syntax or APIs: the docs drilled are 4.7's.
- No unverified claims.
1---2name: godot3description: "Godot 4.7 game projects worked from files and the command line on Windows. Pins one editor version, since a newer editor rewrites project.godot and scenes and an older one downgrades them, keeps .godot/ out of git and the .uid files in it, and enforces static typing through the debug/gdscript/warnings/untyped_declaration setting. Edits .tscn and .tres by hand: section order, ext_resource and sub_resource ids, uid:// references, parent paths and [connection] lines. Connects and emits signals and registers autoloads. Sets up crisp pixel art in project.godot (viewport stretch mode, integer scaling, nearest texture filter, 2D transform snap) and TileMapLayer in place of the deprecated TileMap. Runs Godot headless with the _console.exe build: --headless --import, a SceneTree smoke-test script and its exit code, --export-release with per-version export templates. Adds Steam through GodotSteam: app ID 480 in development, callbacks in an always-processing autoload, and the DLLs to ship."4when_to_use: "Use when asked to set up, edit, run, test or export a Godot 4 project: write a .gd script or type an untyped one, edit a .tscn, .tres or project.godot, make pixel art render crisp, paint or migrate a TileMap, run Godot headless or in CI, fix 'No export template found' or a project 'from a more recent and incompatible version of the engine', or add Steam with GodotSteam. Not for Godot 3, C# scripts or building the engine."5# model: inherit # any model: value blocks Copilot slash invocation6# effort: medium # unset = inherit session effort; there is no 'effort: inherit'7disable-model-invocation: false8metadata:9 source: https://skillmd.com/skills/wardawgmalvicious/godot10---1112# Godot 4 games on Windows: typed, hand-edited, headless1314A Godot project is text a session can read and write: `project.godot`,15scenes (`.tscn`), resources (`.tres`) and GDScript (`.gd`). This skill16covers what goes wrong when it is worked from files and a terminal17instead of the editor: a second editor version rewriting files, an18untyped script nothing flags, a hand edit the next save discards, blurry19pixel art, a headless run before import, and an export with no20template.2122**Dated, and drilled on 2026-11-16** from the Godot docs23(`godotengine/godot-docs` branch `4.7` at `9adca4c`), the engine's source24and class reference at `4.7.2-stable`, the 4.7.2 release's Windows25editor zip, and GodotSteam's docs (`godotsteam/godotsteam-docs` `master`26at `35d8f32`, on Codeberg). Past `references/`, the docs' source,27`curl -s https://raw.githubusercontent.com/godotengine/godot-docs/4.7/<path>.rst`28(the branch named for the project's minor version), the class reference29and engine source at `godotengine/godot/4.7.2-stable/` on the same host,30as `doc/classes/<Class>.xml`, and GodotSteam's at31`curl -s https://codeberg.org/godotsteam/godotsteam-docs/raw/branch/master/docs/<path>.md`.32A live page that contradicts a line here wins: say so, act on the page,33and route the fix by `capture-learning` where it is installed, else tell34the user, bar a dated measured line that35names the page it overrules and the call that measured it, which a page36changed since its date sends back to re-measure. An observed claim is37cited or marked pending a doc check, and stands, marked observed, only38where no page covers it.3940**Not here.** Godot 3 and its GDScript; C# and the .NET build; building41the engine or GodotSteam from source; 3D, physics, animation, audio,42input, UI themes and shaders; export to anything but Windows; test43frameworks; GDScript's naming, code order and typing style beyond the44typing setting in § 3, which follow Godot's own GDScript style guide.4546Detail lives in `references/`: `scene-format.md` (the `.tscn` and47`.tres` grammar, section by section, with examples from the docs) and48`steam.md` (GodotSteam's builds, initializing, callbacks, export and49the files to ship). Each cites its source.5051## 1. Pin one editor version5253**Pin the exact editor, `4.7.2` and not `4.7`, for the whole project,54and write it in the repo's `CLAUDE.md` or README.** Every session and55every collaborator then opens the files with the same binary. A56different one changes them:5758- **A newer editor rewrites what it saves.** On save it rewrites59 `application/config/features` in `project.godot` to its own version60 branch, such as `4.7`, and its rendering method, and drops features it61 does not support (`core/config/project_settings.cpp` at62 `4.7.2-stable`, read 2026-11-16). A scene saved by 4.6 or later gains63 a `unique_id=` on every node, and `load_steps` is gone from its64 header (tscn.rst, read 2026-11-16). One open-and-save in another65 version is a diff in every file it touched.66- **An older 4.x editor downgrades the project.** `config_version` has67 been 5 since 4.0, so no 4.x editor refuses a 4.x project. The project68 manager warns "This project was last edited in Godot 4.7. Opening will69 change it to Godot 4.6." and asks "Open anyway? Project will be70 modified." (`core/config/project_settings.h` and71 `editor/project_manager/project_manager.cpp` at `4.7.2-stable`, read72 2026-11-16). **Opened directly, `-e --path .`, it asks nothing** and73 saves `project.godot` as it opens, unless headless, trimming74 `config/features` to its own version: every 4.x editor from75 `4.0-stable` to `4.7.2-stable` does (`editor/editor_node.cpp` and76 `core/config/project_settings.cpp`, read 2026-11-16). Only an engine77 with a lower `config_version` refuses: "is from a more recent and78 incompatible version of the engine" (`project_settings.cpp`, read79 2026-11-16).80- **Export templates are per exact version** (§ 9).8182**Use the console build from a terminal.** The Windows editor zip holds83two binaries, `Godot_v4.7.2-stable_win64.exe` and84`Godot_v4.7.2-stable_win64_console.exe`, a 198 KB wrapper (observed852026-11-16, the 4.7.2 release's `win64.exe.zip`). Output sent to the86terminal is seen on Windows only through the `console.exe`87(@GlobalScope reference, `printraw`, read 2026-11-16). Point a variable88at it once, `$godot = '<dir>\Godot_v4.7.2-stable_win64_console.exe'`,89and the commands below use it.9091## 2. What git keeps9293- **Ignore `.godot/`**, "various project cache data", and94 `*.translation`, binary imports generated from CSV95 (version_control_systems.rst, read 2026-11-16).96- **Let the editor write `.gitignore` and `.gitattributes`**: the97 project manager's Git option, or Project > Version Control > Generate98 Version Control Metadata. Its `.gitattributes` holds every file to LF,99 as the style guide asks of scripts; without it, set `core.autocrlf100 input` on Windows (version_control_systems.rst, read 2026-11-16).101- **Commit the `.uid` files.** Since 4.4 Godot writes `<file>.uid`102 beside each script and shader, holding its `uid://` id. **A script or103 shader moved outside Godot takes its `.uid` with it**, or every104 reference by `uid://` breaks (Godot blog, "UID changes coming to Godot105 4.4", read 2026-11-16). A `git mv` of `player.gd` is two moves.106- **Commit `export_presets.cfg`**; `.godot/export_credentials.cfg`107 holds secrets and stays out (exporting_projects.rst, read 2026-11-16).108109## 3. Static typing, enforced110111**Typed GDScript's warnings are off by default** (static_typing.rst,112read 2026-11-16), so an untyped declaration parses, runs and is never113flagged. Turn the check on in `project.godot`:114115```ini116[debug]117118gdscript/warnings/untyped_declaration=1119```120121- **The level is 0, 1 or 2**: ignore, warn, error122 (`modules/gdscript/gdscript_warning.h`, read 2026-11-16). At 1 the123 editor and a run report "a variable or parameter has no static type,124 or … a function has no static return type"; at 2 it is an error125 (ProjectSettings reference, read 2026-11-16). Take 2 where a headless126 run must fail on it.127- **Leave `inferred_declaration` at 0.** It flags `:=`, which the style128 guide prefers where the type is written on the same line129 (gdscript_styleguide.rst, read 2026-11-16).130- **The `unsafe_*` warnings** (`unsafe_property_access`,131 `unsafe_method_access`, `unsafe_cast`, `unsafe_call_argument`, each 0132 by default) "do not cover all cases that unsafe lines cover"133 (static_typing.rst, read 2026-11-16): turn them on for more, never134 as proof.135- **`addons/` is exempt by default**, through136 `debug/gdscript/warnings/directory_rules`, `{ "res://addons": 0 }`,137 which the reference says not to remove (ProjectSettings reference,138 read 2026-11-16): a plugin's untyped code does not fail the project.139- **Silence one line, not the setting**: `@warning_ignore("untyped_declaration")`140 above it, the names matching the settings' (warning_system.rst, read141 2026-11-16).142- `project.godot` is INI: the first part of a setting's path is the143 `[section]`, the rest the key, and a setting at its default is not144 written (`project_settings.cpp`, read 2026-11-16). The docs recommend145 the Project Settings window over a hand edit (project_settings.rst,146 read 2026-11-16).147148## 4. Scenes and resources by hand149150**A hand edit is fine if it keeps the format's rules**; the grammar is151in `references/scene-format.md`. The ones a hand edit breaks:152153- **Five sections, in order**: the `[gd_scene]` or `[gd_resource]`154 header, `[ext_resource]`s, `[sub_resource]`s, `[node]`s,155 `[connection]`s. A sub-resource must come after any it refers to:156 the loader fails on a `SubResource` id it has not read yet157 (`resource_format_text.cpp`, read 2026-11-16).158- **Exactly one root node**, with no `parent`; its children take159 `parent="."`, deeper ones the path below the root, `parent="Arm/Hand"`,160 never the root's name.161- **`id` is local to the file** and referenced as `ExtResource("<id>")`162 or `SubResource("<id>")`; a new one needs only to be unique among its163 kind. **`uid` is global**: copy it from the target's header or its164 `.uid` file, never invent one, or leave it out, as the docs' own165 `.tres` example does.166- **A property at its default is not stored, and `;` comments are167 dropped**: write either and the next save from the editor removes it.168- `unique_id` on a node is the editor's to write; a hand-added node169 without one is valid, as every pre-4.6 scene is.170171All from tscn.rst, read 2026-11-16. **Open the scene in the pinned172editor, or run it headless (§ 8), after a hand edit**: a typo shows up173there, not in git.174175## 5. Signals and autoloads176177- **Connect in code with `Signal.connect`**,178 `timer.timeout.connect(_on_timer_timeout)`, and emit with179 `health_changed.emit(old, new)`; the reference recommends180 `Signal.connect` over `Object.connect` in GDScript (Object reference,181 read 2026-11-16). The callback's name is `_on_<node_name>_<signal>`182 by convention (signals.rst, read 2026-11-16).183- **Connecting the same callable twice is an error**,184 `ERR_INVALID_PARAMETER`, unless it was connected185 `CONNECT_REFERENCE_COUNTED`: check `is_connected` first where a186 connect can run twice (Object reference, read 2026-11-16).187- **The editor's Signals dock writes a `[connection]` line** into the188 `.tscn` and generates the callback only in its own script editor;189 with an external editor, connect in code (signals.rst, read190 2026-11-16). A hand-written `[connection signal="pressed"191 from="Button" to="." method="_on_button_pressed"]` loads with the192 editor's default flag (`resource_format_text.cpp`, read 2026-11-16).193- **Design a scene to need nothing outside itself**; where it must, its194 parent wires it, and a signal is for responding to behavior, not195 starting it (scene_organization.rst, read 2026-11-16).196- **An autoload is for a system that tracks its own data, is needed197 globally and stands alone**; systems that change others' data are198 their own scenes (scene_organization.rst, read 2026-11-16). It is199 registered in `project.godot` as `[autoload]` `Name="*res://path.gd"`,200 the `*` making it a global singleton (`project_settings.cpp`, read201 2026-11-16).202203## 6. Pixel art204205The docs' recipe for pixel art (multiple_resolutions.rst, read2062026-11-16) sets the `[display]` lines and gives the quoted reasons;207the `[rendering]` two, and the rest of each setting's meaning, are from208the ProjectSettings reference (read 2026-11-16), Nearest being this209skill's choice, not a page's:210211```ini212[display]213214window/size/viewport_width=640215window/size/viewport_height=360216window/stretch/mode="viewport"217window/stretch/aspect="keep"218window/stretch/scale_mode="integer"219220[rendering]221222textures/canvas_textures/default_texture_filter=02232d/snap/snap_2d_transforms_to_pixel=true224```225226- **The viewport size is the art's resolution.** 640×360 "scales to227 1280×720, 1920×1080, 2560×1440, and 3840×2160 without any black bars228 when using integer scaling". Set `window_width_override` and229 `window_height_override` for a bigger window while developing.230- **`mode="viewport"`** renders at that size and scales the result,231 "recommended for games that use a pixel art aesthetic"; the default232 is `disabled`. **A project created in 4.7 starts at `canvas_items`233 and `expand`** (upgrading_to_godot_4.7.rst, read 2026-11-16), so its234 `project.godot` already names a mode: change it. `canvas_items` suits235 art that may move by sub-pixels.236- **`aspect="keep"`** holds one aspect ratio, with black bars; the237 recipe allows `expand` only with Controls anchored to fit.238- **`scale_mode="integer"`** scales by whole multiples only. A window239 smaller than the viewport then clips it: set `Window.min_size`. Use240 Exclusive Fullscreen, since plain Fullscreen's one-pixel line "can241 cause integer scaling to use a smaller scale factor than expected".242- **`default_texture_filter=0`** is Nearest, against the default 1,243 Linear.244- **`snap_2d_transforms_to_pixel`** rounds each `CanvasItem`'s245 position, "useful for low-resolution pixel art games", at the cost of246 smoothness, worst with `Camera2D` smoothing; it is read only at start,247 and not to be paired with `snap_2d_vertices_to_pixel`.248249## 7. `TileMapLayer`, not `TileMap`250251- **`TileMap` is deprecated since 4.3**: each layer is its own252 `TileMapLayer` node (upgrading_to_godot_4.3.rst; TileMap reference;253 read 2026-11-16). Migrate an old one in the editor: with the node254 selected, open the TileMap bottom panel, click the toolbox icon in its255 top-right corner and choose "Extract TileMap layers as individual256 TileMapLayer nodes".257- **Save the `TileSet` as its own `.tres`** to share it between layers258 and scenes (using_tilemaps.rst, read 2026-11-16).259- **Coordinates are 16-bit signed**, −32768 to 32767, and changes are260 batched to the end of the frame: call `update_internals()` where code261 needs them sooner (TileMapLayer reference, read 2026-11-16). Set a262 cell in code with `set_cell(coords, source_id, atlas_coords)`.263- **Since 4.5 physics is chunked by default**, which changes what264 `get_coords_for_body_rid()` returns; `physics_quadrant_size = 1`265 restores one body per cell (upgrading_to_godot_4.5.rst, read266 2026-11-16).267268## 8. Headless on Windows269270**Import before anything else in a fresh clone.** `.godot/` is not in271git, so nothing is imported yet; `--import` "starts the editor, waits272for any resources to be imported, and then quits" (command_line_tutorial.rst,273read 2026-11-16):274275```powershell276& $godot --headless --path . --import277```278279`--headless` is `--display-driver headless --audio-driver Dummy`.280**A smoke test is a script that extends `SceneTree`** (or `MainLoop`),281run by `--script`; `--check-only` with it parses and quits282(command_line_tutorial.rst, read 2026-11-16). `_initialize()` runs283once at start (MainLoop reference, read 2026-11-16); this script is284built from the references, not run here:285286```gdscript287extends SceneTree288289290func _initialize() -> void:291 var scene: PackedScene = load("res://main.tscn")292 if scene == null:293 push_error("res://main.tscn failed to load")294 quit(1)295 return296 root.add_child(scene.instantiate())297 quit(0)298```299300```powershell301& $godot --headless --path . --script res://tests/smoke.gd302$LASTEXITCODE303```304305- **`quit(exit_code)` sets the process's exit code**, applied at the306 end of the frame; keep it within 0 to 125 for portability (SceneTree307 reference, read 2026-11-16). Quit non-zero on every failure the test308 finds.309- **Whether the console wrapper passes the exit code through is310 unchecked**, pending a doc check or a run: before trusting311 `$LASTEXITCODE`, run a script that calls `quit(3)` once on the pinned312 version and read `3` back.313- **The binary must be the editor**, not an export template, for314 `--import` and the exports below (command_line_tutorial.rst, read315 2026-11-16).316317## 9. Export318319- **Install the templates for the exact version**: Editor > Manage320 Export Templates, or a downloaded `.tpz` (exporting_projects.rst, read321 2026-11-16). They are looked up under a folder named for the full322 version, so an editor update without its templates fails with "No323 export template found at the expected path:"324 (`editor/export/editor_export_platform.cpp`, read 2026-11-16).325- **Export from the command line by the preset's name** in326 `export_presets.cfg`:327328 ```powershell329 New-Item -ItemType Directory -Force build\windows | Out-Null330 & $godot --headless --path . --export-release '<preset name>' build/windows/game.exe331 ```332333 The target directory must exist, and a relative path is relative to334 the project, not the current directory; `--export-debug` and335 `--export-pack` work alike, and each implies `--import`336 (command_line_tutorial.rst, read 2026-11-16).337- **Windows packs the project into a `.pck` beside the `.exe`**, which338 the page calls `data.pck`, unless the preset embeds it, up to about339 3.89 GB in all; `debug/export_console_wrapper` adds the console wrapper340 for a build that prints to a terminal; signing reads341 `GODOT_WINDOWS_CODESIGN_IDENTITY_TYPE`,342 `GODOT_WINDOWS_CODESIGN_IDENTITY` and343 `GODOT_WINDOWS_CODESIGN_PASSWORD` (exporting_for_windows.rst and the344 EditorExportPlatformWindows reference, read 2026-11-16).345- **A file or folder whose name starts with a period is never346 exported** (exporting_projects.rst, read 2026-11-16).347348## 10. Steam through GodotSteam349350Detail and sources in `references/steam.md`. In short:351352- **The GDExtension build is an addon** in `addons/godotsteam/`, needs353 no enabling, and exports with the regular Godot templates, never354 GodotSteam's; the pre-compiled build is GodotSteam's own editor and355 templates instead.356- **Ship `steam_api64.dll` and the GodotSteam library** beside the357 `.exe`; **never ship `steam_appid.txt`**.358- **In development, app ID 480**, Valve's SpaceWar, set under Steam >359 Initialization in the project settings or passed to `steamInitEx()`.360- **`Steam.run_callbacks()` every frame in an autoload that never361 pauses**: an autoload is a child of the root, which is Pausable, so362 give it `process_mode = PROCESS_MODE_ALWAYS`.363364## 11. Constraints365366- **One pinned editor version**, named in the repo; never open the367 project in another.368- **Typed GDScript, and the warning on** to hold it so.369- **Never invent a `uid://`**; never move a script without its `.uid`.370- **Never trust `$LASTEXITCODE`** from the console build until § 8's371 check has passed on the pinned version.372- No Godot 3 syntax or APIs: the docs drilled are 4.7's.373- No unverified claims.