Area editor: real Godot render preview #62
Loading…
Reference in a new issue
No description provided.
Delete branch "task/59-render-preview"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #59
render_preview.py <area>: generates the descriptor intoweb_editor/scratch/preview.tscn(gitignored) and runs Godot without--headless(headless can't capture frames) using--write-movie --fixed-fps 10 --quit-after 30, i.e. 3s of game time so items settle. Keeps the last frame aspreview_latest.png. Clear exit codes and messages for a missing Godot, a bad descriptor, a timeout, or no frames.POST /api/render(serialized with a lock, since renders share the scratch dir) returnsimage/png;GET /api/healthreportsgodot_configured.local_config.json(example committed) orGODOT_BIN. Setup is intools/mapgen/web_editor/README.md.export_presets.cfg:exclude_filter="tools/*", so tooling and scratch files never ship in a game build.Verified in the sandbox
framesand 404 for an unknown area through the server./api/render(valid PNG, ~7.6s). WithDISPLAYset, Godot picked the x11 driver on its own, the same path a normal desktop takes.--export-packwith a scratch scene present: 0tools/mapgenentries in the pack; game scenes still included.Still to check on a real machine: how the render looks on a real GPU, and that a Godot window flashing briefly during a render is acceptable.
🤖 Generated with Claude Code