godot-pitfalls
Skill1 starsChanged 3 days agoApache-2.0View on GitHub
Use when a Godot 4.x project works in the editor but fails or misbehaves in CI, exports or release builds.
In this repository56 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- algorithmsSkill
- animationSkill
- anti-cheatSkill
- asset-pipelineSkill
- automation-hooksSkill
- calendarSkill
- cameraSkill
- console-certSkill
- debug-toolsSkill
- determinismSkill
- game-aiSkill
- game-audioSkill
- game-dataSkill
- game-designSkill
- game-juiceSkill
- game-planSkill
- game-playtestSkill
- gameSkill
- game-telemetrySkill
- godot-addonsSkill
- godot-diagnoseSkill
- godot-editor-bridgeSkill
- godot-export-releaseSkill
- godot-shaders-vfxSkill
- godot-test-loopSkill
- inputSkill
- kit-reviewSkill
- kitSkill
- legalSkill
- llmSkill
- localizationSkill
- lookSkill
- mathSkill
- mobile-webSkill
- moddingSkill
- multiplayerSkill
- narrativeSkill
- new-gameSkill
- patternsSkill
- performanceSkill
- procgenSkill
- progressionSkill
- release-readinessSkill
- retroSkill
- savesSkill
- serversSkill
- steamSkill
- store-pageSkill
- typographySkill
- ui-accessibilitySkill
- ui-flowsSkill
- verify-before-doneSkill
- weekly-reviewSkill
- xrSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 42
When in doubt: doctor -Json, then test -Json.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Pitfalls we hit (and the fix)
| Symptom | Cause | Fix |
| Export "succeeds" but the game has no C# code, or says no solution file was found | .sln is not next to project.godot | Set dotnet/project/solution_directory under [dotnet] in project.godot (init does it; doctor flags it) |
| Release build contains test code, or fails to compile | Test packages referenced in the game csproj for all configurations; test folders not excluded | Gate packages on Configuration != 'ExportRelease' and <Compile Remove="test/**;gdunit4_testadapter*/**">; put test/*, addons/gut/*, gdunit4_testadapter*/* in the preset's exclude_filter |
Release build breaks on gdunit4_testadapter_v5/ | gdUnit4Net generates that folder inside the project | .gitignore it and exclude it as above |
[RequireGodotRuntime] test missing from coverage | It runs inside the Godot process; coverlet only sees the host | Use GoDotTest for in-engine coverage; keep pure logic in plain classes |
[RequireGodotRuntime] test hangs or errors outside the kit | GODOT_BIN / --headless not set in .runsettings | Let the kit write it (test -Runners dotnet) |
Command exits 0 but printed ERROR: | Godot's exit code ignores script errors | The kit scans logs and fails; do not trust a raw godot --headless exit code |
| Flag has no effect | Godot ignores unknown CLI flags silently | Check spelling against godot --help for the pinned version |
| GUT parse errors after upgrading Godot | addons/gut from the previous Godot minor | The kit stamps and reinstalls its own copy; if you committed GUT yourself, update it |
| Tests pass locally, CI uses another Godot | Godot.NET.Sdk/x.y.z in the csproj decides the version | Pin it; detect -Json shows godotVersion |
| Wrong Godot binary mixes steps | GODOT_BIN from a previous step | Unset it or let the kit install; installed builds are marked HYPERDOT_INSTALLED=1 |
-Results . deletes work | -Results is wiped each run | The kit refuses the project folder, cwd, their parents, and a folder inside the project it did not make (unsafe-results-dir) |
| Zero tests "passes" | A runner that finds nothing is misconfigured | The kit fails it; wire the framework instead |
| Windows build zip not executable on Linux | Zip lost the exec bit | The release tool re-adds it for ELF binaries |
| A debug scene path works in the editor but the exported build ignores it | Release exports ignore scene paths on the command line | Make debug entry points user flags after -- (OS.GetCmdlineUserArgs()); pass them with -GameArgs (automation-hooks) |
A check for kit runs in OS.GetCmdlineArgs() never matches | Godot strips its own flags (--headless, --path, --quit-after, --write-movie) from that list; only -s/--script stays (tested 4.7.2) | For any kit run, OS.GetEnvironment("HYPERDOT_RUN") == "1" (the kit sets it on every program it starts, saves); otherwise DisplayServer.GetName() == "headless" for headless runs and OS.HasFeature("movie") for recordings; a game's own flags go after -- |
A C# library's hot path (a server tick, pathfinding, a simulation) is several times slower than expected, in kit runs and in bench | Godot builds and runs a C# game in Debug, and a plain library the game references inherits it: no optimisation (doctor says so, INFO) | Set <Optimize>true</Optimize> in that library's csproj for every configuration, and measure before and after |
| Exports fail or behave oddly after an upgrade | Editor, Godot.NET.Sdk/x.y.z and export templates differ | All three must match; the kit installs the matching templates into the editor's own folder (%APPDATA%\Godot\export_templates\<version>.mono) |
| Notes or design PDFs inside the export | A preset's include_filter matches them (by default Godot exports resources only) | doctor warns; add *.md, *.pdf to the exclude filter or narrow the include filter |
| Movie-writer frames are the wrong size | The movie writer is tied to the startup window size | Use shot -Resolution, or save GetViewport().GetTexture().GetImage() after RenderingServer.FramePostDraw |
| Screenshot of a headless run is empty | Headless draws nothing | Run shot with a display (a virtual one on Linux) |
Engine crashes on exit (corrupted size, exit 134) after adding a custom monitor | The monitor's callable outlives its node | Performance.RemoveCustomMonitor in _ExitTree |
Leaked instance dependency and N ObjectDB instances were leaked at exit after building a MultiMesh from asset scenes | A scene instantiated only to read its mesh is never in the tree, so nothing frees it | inst.Free() once the mesh is read (tested, 4.7.2); or load the Mesh resource directly |
C# game: FATAL: Condition "csharp_lang && !csharp_lang->script_bindings.is_empty()" at exit (exit 134) | C# wrappers still bound when the engine tears down | Free throw-away instances first (above). One game stopped it with GC.Collect(); GC.WaitForPendingFinalizers(); in the main scene's _ExitTree; a minimal 4.7.2 project did not reproduce the crash, so this is reported, not proven. The kit's runners treat it as a warning once every check was judged |
N resources still in use at exit in a headless run | Usually the dummy audio driver at shutdown; harmless there | If it fails your runs, set HYPERDOT_IGNORE_ERRORS='resources still in use at exit'; investigate if it also appears with a real audio device |
ERR_CANT_OPEN from audio_driver_alsa on a server or CI machine | No sound device | bench and shot already use the dummy audio driver; pass --audio-driver Dummy to your own runs |
| V-Sync on, yet thousands of FPS | The driver ignores V-Sync (seen: Compatibility renderer on NVIDIA) | Try Mobile on Vulkan with fallback_to_opengl3; cap Engine.MaxFps at the refresh rate as a safety net (performance) |
| A one-way platform blocks the wrong direction | One-way shapes block motion along their local +Y | Rotate the body 180 degrees to block upward motion |
| A scene script's class is not found | Scripts attached to scenes need file name = class name | Extra partial Godot classes in one file are fine when you create them with new |
| Banding blobs in a posterized look, dark additive particles | Posterize plus soft fog; fog applied to additive materials | Reduce fog softness under posterize; disable fog on particle materials |
| Build tools or test kits end up inside the exported game | Godot imports and exports every resource under the project folder, .gd scripts included | Keep tooling outside the project folder, or put an empty .gdignore file in its folder (this kit ships one) |
xvfb-run output is not valid JSON | xvfb-run merges the command's stderr into stdout | Start Xvfb :99 & yourself and set DISPLAY=:99 |
When in doubt: doctor -Json, then test -Json.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

