google / google/codeworld

Rewind in debug controls

Open
#710 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Haskell
Stars
1.3k
Forks
201
PR merge metrics
No merged PRs in 30d

Description

Currently, the speed options for debug mode go from 0x (paused) to 5x. It would be nice to have a rewind option, as well.

The implementation would be trivial for animations, where you just want to subtract from the current time every frame. For non-debug simulations, this is impossible anyway, so the slider should only go to zero.

Debugged simulations and interactions are the hard case. We know the past states, but we don't know their times. If we did know the times, this would be doable, but complex. (The new debug state type would have to contain two lists of paired state-and-timestamp, and a current timestamp: `([(a, Double)], [(a, Double)], Double)` This also opens the question of whether you want the history slider scaled by frame, or by time.

Contributor guide

Open the contributing guide

Research direction

The issue names no files or tests. Start by tracing the debug-mode speed slider and the debug state type, then compare animation handling with debugged simulations. Before implementation, settle whether history is scaled by frame or timestamp and define rewind behavior; done means the chosen design works for the stated debug controls.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.