Show the fight that was already happening #43
No reviewers
Labels
No labels
area/ai
area/build
area/character
area/combat
area/data
area/docs
area/game
area/net
area/ui
area/world
size
l
size
m
size
s
type
bug
type
design
type
feature
type
refactor
type
test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
icub3d/terra-redux-org!43
Loading…
Reference in a new issue
No description provided.
Delete branch "9-outcome-playback"
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?
CLAUDE.md§ Separation of Simulation and Presentation promised that resolution computes awhole outcome and animation catches up afterwards. The first half has been true since #7.
This is the second.
It corrects something I had recorded wrong
I wrote in
CLAUDE.mdthat "a unit teleports to where it walked". It does not. Nothingever moved a unit's
Transformwhen itsGridPoschanged, so a walk was invisible —the hostiles have been closing across the board since #11 and every screenshot this session
showed them standing exactly where they spawned. Playback is not polish here; it is the
only thing that moves a body.
The dependency points one way and is made to show it
src/playback/is its own module rather than a corner ofcombatorworld: it readsboth and neither reads it. Combat waits on
StillShowing, which combat owns and playbacksets, so a mission run with no playback behaves exactly as it did before.
Two tests hold that down:
showing_a_mission_does_not_change_itfights the same mission with and without theplugin and compares the reports.
playback_never_writes_what_the_simulation_ownsruns frames in which only playback islive and asserts no cell and no hit point moved.
Acceptance criteria
Transforms, asserted by the test above.headless test in the repo runs without the plugin and still passes;
PlaybackSpeed(0)skips instantly, and a test uses it.
theme::tempo::STEP_SECONDSis howlong a unit takes to cross one tile, and everything else derives from it.
PlaybackSpeedscales the lot.themetypography —type_scale::SUBHEADINGandsemantic::WARNING.What it shows
A walk interpolates along the route resolution already chose — the whole path is in the
outcome, so playback follows it rather than guessing. A hit floats its damage above the
target and fades. A unit that falls settles where it stood and stays there, because nothing
despawns the fallen and #12 leaves them on the map.
Also
Restores the
src/game/section of § Current Status, which #12 should have carried — thescript that wrote it aborted on a later edit before saving, and I only noticed while adding
playback beside it.
Verification
cargo fmt --check,cargo clippy --all-targets -- -D warnings,cargo test—205 passing, up from 196.
On a Pixel Tablet: an enemy cone has advanced from the back row onto the centre platform.
Every earlier screenshot in this session had both cones frozen at their spawns.
Closes #9
🤖 Generated with Claude Code
https://claude.ai/code/session_01TA4hJHkRSU3XBxZYtMKXdh