Zandronum Chat on our Discord Server Get the latest version: 3.2
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004411Zandronum[All Projects] Bugpublic2024-09-06 16:112025-05-04 01:34
Reporterunknownna 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusfeedbackResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0004411: PRNG discrepancy between offline and online play, too deterministic online
DescriptionThere seems to be some strange bug or something with the old random generator online. It seems almost too deterministic, and the same odds can't be selected twice compared to offline.
Here's what I noticed when adding bots:

The same bots always enter the game alternately online. This doesn't happen offline with the same settings.
The first bot you add under certain set conditions is always Linguica or Orion. If you remove him and begin to add and remove bots after him, the bots are always Rigel and Doomcrate alternately.

If you disconnect and turn into a spectator and begin to add and remove bots, it will eventually always cycle between Manek, Doomcrate and Cataclysm for the most part, but a single bot can be added many times in a row compared to online.

Does this mean that the RNG is forced to use the same numbers alternately over and over again instead of randomizing properly online? It can't select the same number twice, if judging by adding and removing bots.
I know the old RNG is desired in its ability to consistently select higher numbers on average, and I personally always use it when playing oldschool wads, but there seems to be a potential issue with it online.
Steps To Reproduce1. zandronum -host -iwad doom2.wad +sv_updatemaster 0 +sv_nomonsters 1 +sv_norespawninvul 1 +compat_oldrandom 1
2. Connect a client to the server and grant it RCON access.
3. Use "rcon addbot". It will add Linguica or Orion.
4. Use "rcon removebot".
5. Use "rcon addbot;rcon removebot;rcon addbot;rcon removebot". It will always add and remove Rigel and Doomcrate every time this command is entered.

6. Use "map map01" to disconnect. Make sure cl_keepserversettings is 1.
7. Use "spectate" to become a spectator to create similar conditions to online play.
8. Use "addbot" to add a bot.
9. Use "removebot" to remove a bot.
10. Repeat step 8 and 9 over a few times and it will eventually cycle between Manek, Cataclysm and Doomcrate, sometimes selecting one bot many times in a row.
Additional InformationThe reason why I'm reporting this is in case the RNG actually is broken and it also affects weapon damage, where clients are forced to use the same numbers over and over again without being able to use the same random number twice. This could lead to situations where clients consistently do lower damage on average if they're unlucky.
Attached Files? file icon rng_test_01.wad [^] (4,777 bytes) 2025-05-04 01:23

- Relationships

-  Notes
User avatar (0024538)
unknownna (updater)
2025-05-04 01:34

I noticed one striking difference between online and offline play with Linguica as a bot and "compat_oldrandom 1"

Offline, he will almost always endlessly spam-taunt until you do something that disrupts the RNG, like by triggering a script.
Online, he will not do this, and will always break up from the spam-taunt every now and then by himself to repeat 2x chat lines consistently.

This suggests that the RNG is affected by something online all the time unlike offline, making it more deterministic and repetitive, or at least more predictive.

The RNG then changes when somebody scores once in CTF, causing the bot dialogue to change to another 2x of chat lines. It's as if the offset of the RNG changes, causing it to select different things consistently. This doesn't happen to the same degree offline.

To confirm this, you can follow these steps first. This will certainly reproduce the deterministic behavior of the RNG online:

1. zandronum -host -iwad doom2.wad -file rng_test_01.wad +ctf 1 +sv_keepteams 1 +compat_oldrandom 1
2. Connect a client to the server and join the game blue team.
3. "addbot linguica" through RCON or the server console. He will join the red team.
4. Notice how he first says "Oh great" or "This level sucks", then spam-taunts a little, and then chats "http://andrewstine.org/" or "My lair sucks" consistently between spam-taunts.
5. Take the red flag and score 1 point.
6. Notice how he spam-taunts a little, then starts to chat "I made tetris in ACS" or "MAP29: 'the rear end'" consistently between spam-taunts. The RNG offset changed from scoring a point in CTF.

You can then try the same thing offline and get rather different results:

1. zandronum -iwad doom2.wad -file rng_test_01.wad +ctf 1 +sv_keepteams 1 +compat_oldrandom 1 +map map01
2. Join the blue team.
3. "addbot linguica" in the console. He will join the red team.
4. Notice how he says some welcome chat line that differs from online play, and then almost endlessly spam-taunts, unless you press the switch repeatedly to disrupt the bot. Then the chat lines are different from online, like "I made tetris in ACS" and "Carn, why didn't you put in the *****demon yet?". There are more different chat lines appearing offline compared to online play.
5. Take the red flag and score 1 point.
6. Almost nothing changes, unless you repeatedly press the switch in the middle again to disrupt the bot. Then the bot chat lines are a bit different again, like "Why doesn't this level have enough plasma?", "Uh I really don't suck this bad" and "I am the ACS master". The RNG offset changed from scoring a point in CTF, though to a much lesser extent offline. More varied bot chat lines appear again compared to online play.

Won't this possibly affect weapon damages online if the RNG changes to a bad offset compared to offline play? The RNG seems to be more deterministic and repetitive online if judging by bot behavior, selecting fewer numbers perhaps due to less chat dialogue appearing. The issue with CTF scores affecting and changing the RNG offset will probably affect other things too.

Another reason why I'm very curious about this is because I believe it might affect map changes and whatnot, like this closed merge request was supposed to address:'https://foss.heptapod.net/zandronum/zandronum-stable/-/merge_requests/229 [^]'

Something tells me there's still potentially some underlying bug or inconsistency with the RNG. I also had some rare instances before where I had to fire multiple SSG shots at bots in close range that didn't kill them.

Issue Community Support
Only registered users can voice their support. Click here to register, or here to log in.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2024-09-06 16:11 unknownna New Issue
2025-05-04 01:23 unknownna File Added: rng_test_01.wad
2025-05-04 01:34 unknownna Note Added: 0024538
2025-05-04 01:34 unknownna Status new => feedback






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker