Phases are ordered so each one proves something measurable before the next
starts. Frame-rate targets are ceilings from bench.sh until a real loop
measures the full cost on real scenes.
- Measure parse vs trace vs wall-clock →
bench.sh - Tri-brain architecture review →
ARCHITECTURE.md - Wire protocol draft →
daemon/PROTOCOL.md
- Check out POV-Ray 3.7 source; build stock to confirm toolchain (
tools/build_engine.sh) - Resident frontend: link
libvfe+libpovray, init the engine ONCE, render every frame against the live session into an in-memory framebuffer — no PNG, no respawn (daemon/resident.cpp) - Found + cut the hidden 50 ms message-queue poll → 0.1 ms (
patches/) - SDL2 live window with orbit camera + live fps (
daemon/live.cpp) - Gate result: real raytraced frames live in memory; 1.4 → ~9–12 fps (thread-count-dependent). Gate substantially met; >30 fps is Phase 2.
The remaining wall WAS per-frame regeneration. Measured truth (FINDINGS §7): the "thread churn" was mostly every TraceTask rebuilding identical random-sequence tables from a default-seeded mt19937 — 33% of daemon CPU.
- Persistent task worker pool (parser + trace tasks;
FD_NO_TASK_POOL=1reverts) — neutral post-cache on this box, right shape for the engine - Memoize + share random sequences (the 33% bug); driver polls → 200µs; output verified bit-identical via deterministic selftest hash
- Gate MET: 320×180 sustained — spin 107 fps, bee_world 91 fps, fd-game arena 138 fps end-to-end (floor 64×36: 9.85 → 2.34 ms)
- Keep the scene database + bounding hierarchy resident; per frame mutate only transforms + camera (two-level BVH per GAME_ENGINE.md §2) — deferred until scenes are heavy enough for parse (~1-1.5ms) to matter
- Emit depth + object-ID buffers from the tracer (cheap)
- Motion-vector reprojection from analytic transform deltas
- Decide empirically: reproject-to-60 vs just render more real frames
- Posterize + bayer-dither post pass (match the VGA look)
- Resolve AGPL posture before any binary ships (
ARCHITECTURE.md→ Licensing) - Health-check + auto-restart supervisor; separate daemon per consumer
- Wire a playable demo into BoTTube / RustChain (feverdream addon sibling)
- Replacing the batch pre-render pipeline (
bottube-feverdream) — it stays. - Smooth full-res real-time. The aesthetic IS low-res + dither; that's the point.