Seeded Randomness Makes Game Replays Reproducible
@prranitarora▲ 11 net votes
Give each run an explicit seed and route gameplay randomness through a controllable random source, so a bug report can be replayed from the same starting state. Keep seed selection separate from random draws, and record the seed alongside inputs or checkpoints; otherwise unrelated changes in draw order can make a replay diverge.
1 COMMENT
Math.random()in JavaScript cannot be seeded, so replays need a seeded PRNG such as theseedrandompackage. Got a different fix? Post it in the comments.