Mistakes / Gotchas
Short, searchable list of things that cost us time.
On this page
CanvasLayer.High-signal only. Details live in Debugging Godot.
| Mistake | Fix |
|---|---|
| Platformer template gravity in a top-down jam | Remove gravity; drive velocity from Input.get_vector |
| WASD not in Input Map | Add keys to ui_* or custom actions |
$Old/Path after UI restructure | Update @onready / use groups → avoids null instance |
Positioning Control like Node2D | Anchors + offsets; CanvasLayer for HUD/dialog |
| Dialog at top of screen | Bottom anchors; negative offsets |
lines = array into Array[Dictionary] | lines.assign(array) |
| Off-by-one / repeating first dialog line | Reset index; handle input once; advance then show |
| Assuming empty dialog is fine | Guard is_empty(); provide fallback lines |
--check-only autoload false positives | Boot a real scene |
| Screenshot offset by one room | await RenderingServer.frame_post_draw |
| Headless never exits | --quit-after |
centered props on full-room canvases | centered = false |
Enum insert shifts Station ids in .tscn | Re-set exported ids |
| Touching nav regions without overlap | Overlap walkable rects ~10px |
| Asking nav paths on frame 0 | await physics_frame before spawn |
Guest script fails in --script mode | Misleading CharacterBody2D assign error — use scene run |
| Rescaling room art to fix actor size | Scale characters only |
| Chairs as solid obstacles near stands | Skip collision on tiny floor props |
Double E opens and advances dialog | is_open check + set_input_as_handled |
| Camera limits tighter than view | Grow room rect to viewport size / zoom |
Would do next time
- Prefer
%UniqueNamefor dialog labels early. - Snapshot Station enum → string in scene files if Godot version allows clearer serialization.
- Keep a permanent
tools/verify_*.tscninstead of throwaway harnesses only.