agentleFS
nick-vasnick-vas/hyperdot/.agents/skills/godot-pitfalls/SKILL.md

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.

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
  1. Very specific:

    When in doubt: doctor -Json, then test -Json.

    line 42

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Pitfalls we hit (and the fix)

SymptomCauseFix
Export "succeeds" but the game has no C# code, or says no solution file was found.sln is not next to project.godotSet dotnet/project/solution_directory under [dotnet] in project.godot (init does it; doctor flags it)
Release build contains test code, or fails to compileTest packages referenced in the game csproj for all configurations; test folders not excludedGate 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 coverageIt runs inside the Godot process; coverlet only sees the hostUse GoDotTest for in-engine coverage; keep pure logic in plain classes
[RequireGodotRuntime] test hangs or errors outside the kitGODOT_BIN / --headless not set in .runsettingsLet the kit write it (test -Runners dotnet)
Command exits 0 but printed ERROR:Godot's exit code ignores script errorsThe kit scans logs and fails; do not trust a raw godot --headless exit code
Flag has no effectGodot ignores unknown CLI flags silentlyCheck spelling against godot --help for the pinned version
GUT parse errors after upgrading Godotaddons/gut from the previous Godot minorThe kit stamps and reinstalls its own copy; if you committed GUT yourself, update it
Tests pass locally, CI uses another GodotGodot.NET.Sdk/x.y.z in the csproj decides the versionPin it; detect -Json shows godotVersion
Wrong Godot binary mixes stepsGODOT_BIN from a previous stepUnset it or let the kit install; installed builds are marked HYPERDOT_INSTALLED=1
-Results . deletes work-Results is wiped each runThe 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 misconfiguredThe kit fails it; wire the framework instead
Windows build zip not executable on LinuxZip lost the exec bitThe release tool re-adds it for ELF binaries
A debug scene path works in the editor but the exported build ignores itRelease exports ignore scene paths on the command lineMake debug entry points user flags after -- (OS.GetCmdlineUserArgs()); pass them with -GameArgs (automation-hooks)
A check for kit runs in OS.GetCmdlineArgs() never matchesGodot 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 benchGodot 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 upgradeEditor, Godot.NET.Sdk/x.y.z and export templates differAll 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 exportA 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 sizeThe movie writer is tied to the startup window sizeUse shot -Resolution, or save GetViewport().GetTexture().GetImage() after RenderingServer.FramePostDraw
Screenshot of a headless run is emptyHeadless draws nothingRun shot with a display (a virtual one on Linux)
Engine crashes on exit (corrupted size, exit 134) after adding a custom monitorThe monitor's callable outlives its nodePerformance.RemoveCustomMonitor in _ExitTree
Leaked instance dependency and N ObjectDB instances were leaked at exit after building a MultiMesh from asset scenesA scene instantiated only to read its mesh is never in the tree, so nothing frees itinst.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 downFree 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 runUsually the dummy audio driver at shutdown; harmless thereIf 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 machineNo sound devicebench and shot already use the dummy audio driver; pass --audio-driver Dummy to your own runs
V-Sync on, yet thousands of FPSThe 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 directionOne-way shapes block motion along their local +YRotate the body 180 degrees to block upward motion
A scene script's class is not foundScripts attached to scenes need file name = class nameExtra partial Godot classes in one file are fine when you create them with new
Banding blobs in a posterized look, dark additive particlesPosterize plus soft fog; fog applied to additive materialsReduce fog softness under posterize; disable fog on particle materials
Build tools or test kits end up inside the exported gameGodot imports and exports every resource under the project folder, .gd scripts includedKeep tooling outside the project folder, or put an empty .gdignore file in its folder (this kit ships one)
xvfb-run output is not valid JSONxvfb-run merges the command's stderr into stdoutStart Xvfb :99 & yourself and set DISPLAY=:99

When in doubt: doctor -Json, then test -Json.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.