[Major Feature] Hybrid Scene Serialization — declarative scene-graph snapshot (test oracle + save/load) with raster escape-hatch #349
Labels
No labels
Alpha Release Requirement
Bugfix
Demo Target
Documentation
Major Feature
Minor Feature
priority:tier1-active
priority:tier2-foundation
priority:tier3-future
priority:tier4-deferred
Refactoring & Cleanup
system:animation
system:documentation
system:grid
system:input
system:performance
system:procgen
system:python-binding
system:rendering
system:ui-hierarchy
Tiny Feature
workflow:blocked
workflow:needs-benchmark
workflow:needs-documentation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
john/McRogueFace#349
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Tracking issue for the Proposal: Hybrid Scene Serialization wiki page (Design Phase).
One-paragraph summary
McRogueFace is retained-mode: a frame is a pure function of
(UIDrawable tree + assets). Instead of rasterizing to PNG (profiling showed ~96.6% of a screenshot-per-frame workload is spent in PNG DEFLATE,stbi_zlib_compress), walk the tree and serialize each node's type + properties + asset references — SVG-analogous, capturing render inputs not outputs. Cheap (memcpy-of-properties, no rasterization), tiny (KB not MB), deterministic, and diffable. Procedural textures (render-texture/composite/hsl_shift/shader outputs) escape-hatch to a referenced QOI/TGA sidecar. Rasterize on demand by replaying the scene file back through the engine ("lazy rasterization"), so frequent capture is nearly free.Why it's two features in one
f3.x: 100→104) beats pixel-diffing for layout/logic regressions; immune to GPU/AA/driver/backend flakiness.Governing distinction (scope boundary)
Records render inputs, not outputs → complements raster screenshots, does not replace them. It is blind to rendering bugs (wrong shader/blend/z-order/clip/atlas offset). Raster capture stays the tool for visual/shader correctness.
Proposed increments (see wiki Migration Path — purely additive)
serialize()/to_dict()onUIDrawable: Frame/Caption/Sprite first (tree walk already exists inImGuiSceneExplorer)automation.snapshot_scene(path)DiscreteMapbyte path)tests/Dependencies / relationships
automation.screenshot()(raster escape-hatch needs a fast lossless encoder).Status
Design Phase — needs review/approval before implementation per the wiki proposal process. No prior issue or proposal covered scene serialization (confirmed 2026-07-10); this is novel to the project.