Divergences in games are particularly troublesome when attempting to build a fully deterministic system. To validate that our systems are deterministic, we needed to be able to reliably measure and compare outputs over multiple executions with the same inputs. By extrapolating, we can arrive at the most important guideline for achieving determinism: software divergences are the product of unexpected inputs. C++, x86 hardware, flat files, and executable code are already deterministic in the ways we care about, so we may infer that any divergences encountered are caused by unexpected inputs. ![]() A divergence can be discovered by comparing the runtime state of a game (some portion of the game data stored in memory) between multiple executions with fixed inputs.Ĭomputer software is designed to be free of divergences. When software fails to behave in a deterministic fashion, we call the event a divergence. The good news is that most programming languages, computer hardware, and software designs are already deterministic by nature. If one substitutes the number 1 for x in this equation, f(1) will always equal 2. Consider an example of determinism in simple algebra: The equation: Defining DeterminismĪ process is said to be deterministic when, given a fixed set of inputs, it always produces the same outputs. For more on the problem we were solving, check out the intro to this series. In this post, I’ll dig into the implementation of determinism in League. ![]() ![]() Most importantly, we delivered a functional basis for the Deterministic Disaster Recovery (DDR) toolset, which is, as of this writing, deployed in an early form in the NA LCS. ![]() We also created powerful new tools that allow us to record, play back, and validate real-world League of Legends games, enabling new opportunities for optimizing and testing code changes. We removed swaths of dead or redundant code and created new opportunity spaces for gameplay exploration. As a side benefit of this effort, we holistically improved the codebase’s robustness, discoverability, and maintainability. Taking the League of Legends game server from a nondeterministic process to its current state required almost a full year of effort from multiple engineers.
0 Comments
Leave a Reply. |