Conversation
A recorder now keeps only the first so many entries on request, so a tape can be cut where a branch left the old future and recorded on from there. Truncating to nothing makes the next entry a first one again.
RunTimeline.stepOnce at the present stepped the simulation without writing the input to any recorder or taking a due keyframe, so a rewind or branch afterwards replayed to a state the run never had. It now writes to recorders (the loop's list, or the rewind buffer's recorder by default), keyframes through capture and runs onStepped after the step. releaseAt and branchHere report the step they cut to and how far back it was through onBranched. DemoRecording.branched truncates the demo's tape there, forgets later checkpoints and drops swaps after the step, so a saved demo replays the branch that was played rather than the old future.
The platformer, crypt and racer hand RunTimeline their GameLoop.recorders and a capture, so a paused step lands on the rewind and demo tapes and keyframes. The platformer also checkpoints a paused step into its demo and cuts the demo on a branch; a branch back past the demo's start begins it again from now with the level on screen at step zero.
N4 and HR3 move the stepOnce and branch items from Left to Done and say what stays: a paused step still runs only the simulation step, and the crypt and racer demos do not hear branches. Test counts updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Paused steps and branches now stay on the run's tapes (N4 and HR3 tails in
tasks/0.9-engine-roadmap.md).What changed
RunTimeline.stepOnceat the present now records its step, as a loop step does: input to the recorders first (the rewind buffer's by default, or the loop'sGameLoop.recorders), then the due keyframe throughcapture, the step, andonStepped. A rewind or branch after paused steps now replays through them.releaseAtandbranchHerecallonBranched(step, stepsAgo:).DemoRecording.branchedcuts the demo's tape there with the newInputTapeRecorder.truncate, forgets later checkpoints and drops later level swaps. A swap exactly at the branch step is kept: restoring a snapshot does not undo a swap, so that level is still the one on screen.capture, a checkpointingonSteppedandonBranched. A branch from before its demo started restarts the demo with the level on screen at step 0. The dungeon and racing pass their recorders andcapture.Tests
run_timeline_test,demo_recording_test(a branched run replays throughreplayDemowith no divergence),input_tape_test, anddemo_level_swap_teston the real platformer, byte for byte.tool/structure.dartholds.Left
stepSim, not the game's whole step: sounds and events from paused steps show on the next live step.DemoRecording, so a branch there leaves their demo tape on the old future.Overlap to check: the cn queue has HR3 and N4 tasks in verifying (t-a7a8eaa5f63a, t-c91a30969bc3). This branch closes Left tails of those items, not their main work; worth a look before merging either.