-
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I do not know the exact details as it's been a while since I've looked into it, but in essence: Demos contain per-tick camera coordinates (Source games always run a server, even in single player, with about 60 ticks per second, exact number depends on game IIRC; also Smooth camera movement at high FPS is achieved by interpolating the camera position between server ticks, and also computing the orientation on the client to react to mouse movement instantly - fast mouse movements are removed from the demo recording. A demo file also contains all of the network traffic from the server, so that replaying a demo is as simple as "connecting to it" as if it were a server. This is what makes demos so lightweight - network code is already optimized to use as little bandwidth as possible to minimize latency, recording a demo just writes that to a file. Demos do not contain the world geometry, that is a separate file either loaded from the game directory, or in case of e.g. CS:GO downloaded before connecting to the server. The static world geometry cannot change, e.g. moveable platforms are entities with their center point coordinates updated with a network event when they are moved. |
Beta Was this translation helpful? Give feedback.
I do not know the exact details as it's been a while since I've looked into it, but in essence:
Demos contain per-tick camera coordinates (Source games always run a server, even in single player, with about 60 ticks per second, exact number depends on game IIRC; also
sv_alternateticks
affects this).Smooth camera movement at high FPS is achieved by interpolating the camera position between server ticks, and also computing the orientation on the client to react to mouse movement instantly - fast mouse movements are removed from the demo recording.
A demo file also contains all of the network traffic from the server, so that replaying a demo is as simple as "connecting to it" as if it were …