News for hackers. Stuff that matters.
Re:Reversing Factorio's RNG by bombcar on Wednesday September 16, 2026 @09:32PM (#49735362)
My favorite is the Doom random number generator, which is just a list of “random” numbers that it cycles through and if you know how to use it, you can do things like concentrate BFG attacks.
Re:Reversing Factorio's RNG by nomel on Wednesday September 16, 2026 @10:40PM (#49735797)
Reminds me of a "Dice" electronics kit I assembled when I was a kid. It just used some standard sequential counter ICs run at very high rate. Pressing the "roll" button would just stop the counter!
Re:Reversing Factorio's RNG by xoxxala on Thursday September 17, 2026 @01:47AM (#49736867)
EverQuest also used pre-generated numbers. The randomness was derived from the large number of players using the same list.
Re:Reversing Factorio's RNG by thaumasiotes on Thursday September 17, 2026 @03:54AM (#49737720)
That sounds like a pretty strong source of true randomness, frankly.

(It's then filtered through the list, so the list needs to have good pseudorandomness properties anyway, but still.)

Re:Reversing Factorio's RNG by eru on Thursday September 17, 2026 @07:04AM (#49739061)
> (It's then filtered through the list, so the list needs to have good pseudorandomness properties anyway, but still.)

Not sure? Suppose your list only had two number 0 and 1, and you build your random numbers one bit at a time.

Or more realistically, you have 256 numbers on the list 0, 1, 2, ..., 255 in order. If the 'large numbers of players drawing from the same list' assumption holds, it doesn't matter much that the list is in order.

What's just a bit weird is why anyone would want to turn an embarrassingly parallel problem into something with a sequential bottleneck?

Re:Reversing Factorio's RNG by thaumasiotes on Thursday September 17, 2026 @07:32AM (#49739273)
> Or more realistically, you have 256 numbers on the list 0, 1, 2, ..., 255 in order. If the 'large numbers of players drawing from the same list' assumption holds, it doesn't matter much that the list is in order.

Why not? That should convert your random number generation into draws from a Poisson process. If you were looking to simulate a Poisson distribution, you're set. If not, you probably just ruined your RNG.

(If the idea is that the interval between any two samples is so large that the list will inevitably be cycled several times before any one person can sample a second byte, there's something to that. It's going to make asking for random numbers more than 8 bits long challenging though.)

Re:Reversing Factorio's RNG by eru on Thursday September 17, 2026 @09:32AM (#49740525)
> It's going to make asking for random numbers more than 8 bits long challenging though.

'Yield' to other players' threads or processes after each byte you draw.

Re:Reversing Factorio's RNG by PennRobotics on Thursday September 17, 2026 @03:45AM (#49737665)
:)

the closely related not-at-all-random fizzlefade from Wolfenstein: https://fabiensanglard.net/fizzlefade/

Re:Reversing Factorio's RNG by vladde on Thursday September 17, 2026 @06:13AM (#49738626)
decino made a video about that, and at 13 minutes in the video they show what happens in-game if you set all values to 0 :)

https://www.youtube.com/watch?v=pq3x1Jy8pYM