beyond-all-reason / beyond-all-reason/RecoilEngine

Replay: pause time flow

Open
#350 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
679
Forks
290
Avg merge
3d 2h
Merged PRs (30d)
40

Description

Bill of materials to be done before starting this ticket:
* #1372
* awareness of #1458

----

Currently pause is simulated instantly in replays because the timekeeping is done by frames.

For example:
```
realtime wall clock -- packet
01:00 server sends gameframe #1800 packet
01:00 sprung sends pause packet
01:03 sprung sends "brb toilet" chat packet
02:37 somebody sends "fuck that dude" chat packet
02:39 somebody sends unpause packet
02:39 server sends gameframe #1801 packet
```
Then the replay client then simulates up to gameframe #1800 at 01:00, decides that frame 1801 must be at 01:00 + 1/30th of a second because that is the rate at which gameframes happen, and simulates the pause-chat-chat-unpause packets during that 1/30th of a sec.

This request is to make replays respect the time it actually took for these events to unfold.

During the startpoint placement, the game is also "paused" in that simframes don't happen but somehow the time is kept correct in replays. I think it's just sending "GameFrame -1" packets at 30Hz for timekeeping purposes which the sim knows to basically ignore. Perhaps that could be replicated for pause as well.

Contributor guide

Open the contributing guide

Research direction

No files or tests are named. Start by tracing replay timekeeping and the startpoint-placement handling, especially the GameFrame -1 packets sent at 30Hz. Done means replay pause, chat, and unpause events preserve their real elapsed wall-clock time rather than being simulated within one frame.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.