Skip to content

Implement Replay Recording and Playback Engine #47

Description

@Mkalbani

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

  • 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

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions