Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Flavio Manna

How Doom Speudorandom Number Generator works with zombieman and imp's animation?

Recommended Posts

Hi, i discovered a little while ago the Doom RNG thanks to this video where it says that zombiemans and imps use the RNG to determinate wich alert sound to use, how does this work? I mean, there are 255 numbers in the random table, based to what they chose a sound or another?

Share this post


Link to post

Whenever something needs a random number, it's picked from the table in the same order, then the number is changed as needed.

This is why demos work on Doom and don't break.

This is also why you should choose PrBoom+ over GZDoom that screws up the RNG and detracts from vanilla experience.

Share this post


Link to post

 

21 minutes ago, Kut said:

Whenever something needs a random number, it's picked from the table in the same order, then the number is changed as needed.

This is why demos work on Doom and don't break.

This is also why you should choose PrBoom+ over GZDoom that screws up the RNG and detracts from vanilla experience.

I think i got it, for example if i need a number between 1 and 8 i just pick the number from the random table and do random_number % 8, and then increment the index by 1.

Share this post


Link to post

I can't tell if the thread title is deliberate or not, but I dig it :)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×