Fix loading qagame so on GNU/Linux - #2
Merged
Conversation
WofWca
added a commit
to WofWca/baseq3a
that referenced
this pull request
Jul 15, 2026
This saves ~0.34% (~1KiB), of traffic and demo size for a ~3-minute match with 4 players, by sending less data when a player or a dead body is seen by another player for the first time in a while. This will increase the size of the initial connection message (`svc_gamestate`, which now needs to send the entities for which we set the baseline state), but it pays off in the long run. How to test this change: 1. `./quake +set cg_autoRecordDemo 1 +set jorunal 1` to record a jorunal file and a demo. 2. Play a game. 3. Build the mod with this patch and install the mod. 4. `./quake +set cg_autoRecordDemo 1 +set jorunal 2` to play back the journal file and record another demo given the very same inputs. Then compare the demo sizes. One can also utilize `cl_shownet 3`. Below is an example of how the "delta from baseline" entries look on vanilla Quake. First two player entries, then two body queue entries: ``` 50: baseline: 2 51: ec-#2 pos.trBase[0]:1024 pos.trBase[1]:1000 pos.trBase[2]:24 apos.trBase[1]:27 eType:1 torsoAnim:11 legsAnim:22 groundEntityNum:1022 pos.trType:1 eFlags:4 weapon:2 clientNum:2 angles[1]:90 apos.trType:1 solid:4200463 (418 bits) 70: baseline: 5 71: ec-#5 pos.trBase[0]:216 pos.trBase[1]:1328 pos.trBase[2]:24 eType:1 torsoAnim:11 legsAnim:22 groundEntityNum:1022 pos.trType:1 eFlags:4 weapon:2 clientNum:5 angles[1]:360 apos.trType:1 solid:4200463 (398 bits) 23: baseline: 65 24: ec-#65 pos.trBase[0]:678 pos.trBase[1]:1446 pos.trBase[2]:24 apos.trBase[1]:135 eType:1 torsoAnim:3 legsAnim:3 groundEntityNum:1022 eFlags:1 clientNum:3 (278 bits) 46: baseline: 66 47: ec-#66 pos.trBase[0]:894 pos.trBase[1]:832 pos.trBase[2]:-15 apos.trBase[1]:225 eType:1 torsoAnim:5 legsAnim:5 groundEntityNum:1022 eFlags:1 clientNum:1 (279 bits) ``` As you can see, basically every field is transmitted, including e.g. `eType`, which is almost always `ET_PLAYER` for players and dead bodies. Now let's see how this patch makes it look: ``` 33: baseline: 3 35: ec-#3 pos.trBase[0]:1024 pos.trBase[1]:1000 pos.trBase[2]:24 apos.trBase[1]:90 eventParm:10 legsAnim:22 angles[1]:90 (255 bits) 84: baseline: 5 86: ec-#5 pos.trBase[0]:1028 pos.trBase[1]:1094 pos.trBase[2]:24 apos.trBase[1]:107 angles2[1]:7 legsAnim:22 eFlags:4 angles[1]:90 (284 bits) 23: baseline: 64 24: ec-#64 pos.trBase[0]:698 pos.trBase[1]:1460 pos.trBase[2]:24 apos.trBase[1]:135 (149 bits) 22: baseline: 65 24: ec-#65 pos.trBase[0]:471 pos.trBase[1]:807 pos.trBase[2]:-15 apos.trBase[1]:315 torsoAnim:3 legsAnim:3 (208 bits) ``` This is much shorter. Sometimes we even don't transmit anything but coordinates and angles. I have tested this on Quake3e and ioq3 engine. The latter still has a bug in `SV_CreateBaseline` which never sends entity numbered 0. But this doesn't cause anything game-breaking, only that this optimization will not be applied to entity 0.
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.
qagamex86_64.so doesn't load on GNU/Linux due to vmMain not being exported.