Correlated randomness in Slay the Spire 2
- Gaming
- Programming
- Developer Tools
- Open Source
The post digs into Slay the Spire 2’s random systems and shows that the game uses several separate pseudorandom number generators seeded in closely related ways. Because the underlying .NET seeded generator has a linear first-output relationship, those separate streams are correlated instead of independent. The result is not just a theoretical bug. Some card rewards and events become biased, some outcomes become impossible, and players can feel that certain rewards show up suspiciously often. People familiar with the game said this fits lived experience, from repeated relic outcomes to weirdly absent cards.
If your product depends on reproducible randomness, treat the generator, seeding scheme, and state serialization as core application logic. Audit every source of nondeterminism early, because platform library defaults and small implementation shortcuts can leak all the way into user-visible behavior.
- tck.mn
- Discuss on HN