Web editor Slice 3: real Godot render preview button #59

Closed
opened 2026-10-04 23:16:36 -04:00 by Nimby · 0 comments
Collaborator

Follow-up to #57. Add a "Render preview" button that shows an actual Godot screenshot of the area.

  • render_preview.py <area>: generate the descriptor into web_editor/scratch/preview.tscn (gitignored, deletes its own old output), then run the configured Godot binary with --write-movie <png> --quit-after N. No --headless: headless mode's dummy renderer crashes on frame capture, while a normal run uses the machine's real GPU.
  • Godot binary path from a gitignored local_config.json (with a committed example) or $GODOT_BIN; fail with a clear message if missing.
  • 60s timeout; errors come back as a 500 with a readable message instead of hanging.
  • POST /api/render streams the PNG to the page.
  • Pin down the exact --write-movie PNG filename pattern first (glob rather than hardcode). This can be checked in the sandbox with Xvfb + llvmpipe, which already produced a correct Treasury frame.

Verification: Claude checks the subprocess plumbing and error paths, plus one end-to-end capture via Xvfb. How it looks on a real GPU needs a check on the user's machine.

Follow-up to #57. Add a "Render preview" button that shows an actual Godot screenshot of the area. - `render_preview.py <area>`: generate the descriptor into `web_editor/scratch/preview.tscn` (gitignored, deletes its own old output), then run the configured Godot binary with `--write-movie <png> --quit-after N`. No `--headless`: headless mode's dummy renderer crashes on frame capture, while a normal run uses the machine's real GPU. - Godot binary path from a gitignored `local_config.json` (with a committed example) or `$GODOT_BIN`; fail with a clear message if missing. - 60s timeout; errors come back as a 500 with a readable message instead of hanging. - `POST /api/render` streams the PNG to the page. - Pin down the exact `--write-movie` PNG filename pattern first (glob rather than hardcode). This can be checked in the sandbox with Xvfb + llvmpipe, which already produced a correct Treasury frame. Verification: Claude checks the subprocess plumbing and error paths, plus one end-to-end capture via Xvfb. How it looks on a real GPU needs a check on the user's machine.
Nimby self-assigned this 2026-10-04 23:55:41 -04:00
Nimby closed this issue 2026-10-04 23:59:25 -04:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
scruffydude/project-awry#59
No description provided.