Re:1500 Archers on a 28.8: Network Programming in Age of Emp...
by MarkTerrano on Thursday July 19, 2018 @03:47PM
(#17569654)
(Original author here) - here was a really hard-to-find bug - in some instances more than one quantity of fish could be placed in the same location - that meant the game would work fine until someone fished that same fish the second time and the fishing boats would diverge in the different simulations. The world sync check only counted the tile contents so we didn't see it. - There were actually two RNG's in the game, one was synchronized with the same start seed on all machines (basically the same random pool) for combat and whatnot - the other was unsynchronized and used for animation variance, etc -things that weren't gameplay related. Not knowing when to use one of these specifically (e.g. animals facing seems like animation but definitely affected gameplay if they could be hunted) could alter the code path and cause an out-of-sync condition.
[ Parent
| on HN ]
Re:1500 Archers on a 28.8: Network Programming in Age of Emp...
by hughes on Thursday July 19, 2018 @04:09PM
(#17569815)
Why even keep the unsynchronized RNG? I'm guessing it was more performant when used appropriately?
Re:1500 Archers on a 28.8: Network Programming in Age of Emp...
by kirkules on Thursday July 19, 2018 @04:49PM
(#17570141)
If you don't have an unsynchronized RNG, then any unsynchronized content can't use an RNG, and unsynchronized content is important for improving a game's experience by using local resources for things that don't really need to be shared or sent over a network.
For example, maybe in a FPS, part of the non-gameplay-critical graphics use particle generators for a cool effect that not all players see (because it's behind a building for some of them and thus doesn't even need to be rendered); if these generators used a synchronized RNG, then all players would have to do computations for every particle effect happening anywhere, just so that the combat and more game-important RNG values would be in synch when they really need to be.
Re:1500 Archers on a 28.8: Network Programming in Age of Emp...
by MarkTerrano on Thursday July 19, 2018 @04:42PM
(#17570072)
There were a lot of extra checks and code involved in the synchronized RNG - the results were loggable (to track down sync failures) for instance so bloating that up with every random fire flicker from a burning castle would have been crazy.
Re:1500 Archers on a 28.8: Network Programming in Age of Emp...
by underwater on Thursday July 19, 2018 @10:35PM
(#17572030)
I wonder if that’s something a type system (or Hungarian notation!) could have helped with.