|
|
|
|
|
by RussellDussel
3736 days ago
|
|
"No two games will ever be the same." Does anybody know how big the seed is for Diablo's RNG? I'm guessing it would have to be 1 value for the environment (to ensure saving/reloading into the same world) but would that 1 value determine all pseudo-randomness (AI aside) in the game (e.g. item drops and their stats). |
|
So I guess there are 2^31-1 unique dungeons per level. Storing, rather than dynamically generating, these dungeons would require a huge amount of disk space. For each level, a 112x112 two-dimensional array of 32-bit integers is used to store the piece IDs which make up each tile (a tile consists of four pieces) [5], and a 40x40 two-dimensional array of 8-bit integers is used to store the tile IDs [6]. Thus, a total of 51776 bytes (roughly 50 KB) is required to store the contents of each generated dungeon.
In total, more than 100 TB would be required to store the contents of each unique procedurally generated dungeon per level. The game contains 17 levels, so to store each unique dungeon for each level, a storage capacity of about 1.7 PB would be required. This might be possible today, but was definitely a challenge back in 1996.
[1]: https://github.com/sanctuary/notes/blob/master/bss/engine.md... [2]: https://github.com/sanctuary/notes/blob/master/functions/eng... [3]: https://en.wikipedia.org/wiki/Linear_congruential_generator#... [4]: https://github.com/sanctuary/d1/blob/master/rand/rand.go [5]: https://github.com/sanctuary/notes/blob/master/bss/gendung.m... [6]: https://github.com/sanctuary/notes/blob/master/bss/gendung.m...