You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build a replay system that records every player action during a session as a timestamped event log and supports deterministic playback of that log. Replays let players review their own solutions, serve as proof-of-solve for on-chain achievement verification, and provide debugging data for the puzzle design team. Replay files should be compact, portable, and verifiable.
Acceptance Criteria
A replay module exists at src/replay/mod.rs
ReplayEvent enum covers all recordable actions: HintReveal, AnswerAttempt, SessionStart, SessionEnd
Events are recorded with microsecond timestamps relative to session start
Completed replays are serialized to a .qreplay binary file in the saves directory
--playback <file> CLI flag loads and replays a .qreplay file, reproducing all events in order
Playback speed is configurable (1x, 2x, 4x) via a CLI argument
Replay files include the puzzle content hash for integrity cross-checking on playback
A replay summary (total time, hints used, attempt count, final score) is printed at playback end
Unit tests cover event recording, serialization roundtrip, deterministic playback, and integrity mismatch detection
Description
Build a replay system that records every player action during a session as a timestamped event log and supports deterministic playback of that log. Replays let players review their own solutions, serve as proof-of-solve for on-chain achievement verification, and provide debugging data for the puzzle design team. Replay files should be compact, portable, and verifiable.
Acceptance Criteria
replaymodule exists atsrc/replay/mod.rsReplayEventenum covers all recordable actions:HintReveal,AnswerAttempt,SessionStart,SessionEnd.qreplaybinary file in the saves directory--playback <file>CLI flag loads and replays a.qreplayfile, reproducing all events in order