Change Log

  • Relevant references to a “run” have been replaced with the term “run”.

Roguelike runs have randomness everywhere. Typical random number generators emulate pseudo-randomness by using the current time as a seed or something like that, but we want to allow players to provide a seed themselves, and have that seed continue to work even when the game is saved and loaded later.

We also want to make it harder for players to “save scum” by reloading a saved run over and over until they get a random roll they’re happy with. It’s impossible to prevent ALL kinds of save scumming (if someone wants to do it, they will find a way), but a properly implemented seeded system will make it a little more involved.

Therefore, I would like the programming team to implement an RNG object into the progression system. The way I see it working is:

  1. A seed is defined at the start of the run, either randomly or provided by the player.
  2. Every time a random number is generated, the state of the RNG object is changed.
  3. When the run is saved, the seed and the state are included in the save data, and loaded when the ramprage is loaded.

I would even recommend creating several RNG objects, generated in sequence from the same initial RNG object containing the main run seed, for each “stream” of randomness. This would prevent actions in one stream from influencing the generation of another. These streams would be:

  • District map layout generation
  • Shop item generation
  • Battle layout generation
  • Actual chance-based battle actions

I don’t know how this is implemented in Unity, but here is the RandomNumberGenerator class in Godot for reference, and here is a C# library that implements the same algorithms.