Idea (from the operator)
A debug affordance: record entity metadata every gametick into a ring buffer, retained for about an hour (drop anything older), in its own module, so a bug can be replayed/inspected after the fact instead of reproduced live.
Why
The recent arrow work (#1066, #1071) needed a decompiled-client dig plus a live packet capture to see that the wire was hard-teleporting the arrow and that the hit-sim and the visual had diverged. A per-tick recording of each projectile's Position / Velocity / Flight / the packets broadcast for it would have shown both in seconds. It also gives an answer to "why did that shot miss / land there" without standing up a client each time.
Sketch
- A
RecorderModule (opt-in, dev/debug builds or a flag) that each tick snapshots a chosen component set (start with projectiles: Position, Velocity, Flight, ProjectileMotion, and the outgoing arrow packets) keyed by entity id + tick.
- A bounded retention: drop samples older than ~1 hour (a ring keyed on tick), so memory is capped and it can be left on.
- A read path: dump/query a given entity's or tick range's history (a command, or a written file) for offline inspection.
Notes
- Scope it so it is off the hot path when disabled (no per-tick cost in release without the flag).
- Projectiles first (the immediate need); generalize to any entity kind after.
Filed as a first-hand but unreviewed suggestion from live play; owner should scope/prioritize.
Idea (from the operator)
A debug affordance: record entity metadata every gametick into a ring buffer, retained for about an hour (drop anything older), in its own module, so a bug can be replayed/inspected after the fact instead of reproduced live.
Why
The recent arrow work (#1066, #1071) needed a decompiled-client dig plus a live packet capture to see that the wire was hard-teleporting the arrow and that the hit-sim and the visual had diverged. A per-tick recording of each projectile's Position / Velocity / Flight / the packets broadcast for it would have shown both in seconds. It also gives an answer to "why did that shot miss / land there" without standing up a client each time.
Sketch
RecorderModule(opt-in, dev/debug builds or a flag) that each tick snapshots a chosen component set (start with projectiles:Position,Velocity,Flight,ProjectileMotion, and the outgoing arrow packets) keyed by entity id + tick.Notes
Filed as a first-hand but unreviewed suggestion from live play; owner should scope/prioritize.