4 ms·
Doom used a lookup table for random numbers: https://doom.fandom.com/wiki/Pseudorandom_number_generator https://doom.fandom.com/wiki/Pseudorandom_number_generat
by wsc981 3y ago
Doom used a lookup table for random numbers: https://doom.fandom.com/wiki/Pseudorandom_number_generator https://doom.fandom.com/wiki/Pseudorandom_number_generator
- 0cf8612b2e1e 3y agoDoes this mean the engine is fully deterministic?
- unleaded 3y agoYes, if you make the exact same inputs you will get the exact same outcome. Demos and multiplayer rely on this, they just record player inputs, nothing about enemy movement or anything like that. This is also why you can leave a multiplayer game in the middle of a match, but you can't join one in the middle https://www.youtube.com/watch?v=pq3x1Jy8pYM https://www.youtube.com/watch?v=pq3x1Jy8pYM
- bombcar 3y agoYes, and that speed runs can be “seed runs” where you do things to make the right LUT number come up at the right time. The DooM Engine Black Book goes into details. https://fabiensanglard.net/doom_fire_psx/ https://fabiensanglard.net/doom_fire_psx/ also Other games use seeded random number generators to be entirely deterministic even though random; Factorio does this to allow multiplayer without having to sync the entire game state all the time.