Question about legality of reusing portion of Dooms random number sequence.

Started by
5 comments, last by LorenzoGatti 3 years, 2 months ago

Hello,

I was wondering if it's legal to use data from Doom source code in my own project.I am finishing up a mod for a game. It uses Dooms random table, you can see it here:
https://github.com/id-Software/DOOM/blob/master/linuxdoom-1.10/m_random.c
"rndtable"

Am I obligated to follow source code license and share the source of mod?
It's just a sequence of numbers, but it's still a peace of source code used for same purpose as well.

Edit: Sorry, did a mistake in title, its not a portion, its entire sequence.

Advertisement

Why would you do something like this In the first place, never mind if it’s legal or not?

There is Mersenne Twister support built into the C++ language. If you're stuck using C, then try this library: https://github.com/ESultanik/mtwister​

Works good. No patent issues or whatnot.

This random number table doesn't look anything special - it's just all numbers from 0 to 255 randomly shuffled. The kind of thing you could quite trivially create yourself, in other words, and there's no reason to copy from Doom.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

21st Century Moose said:

This random number table doesn't look anything special - it's just all numbers from 0 to 255 randomly shuffled. The kind of thing you could quite trivially create yourself, in other words, and there's no reason to copy from Doom.

If you look for certain numbers, they repeat.

254 - 2
128 - 2
1 - 0
166 - 3

So the numbers are not unique in entire sequence.

Question is related to specific set of numbers in their exact order.

Thank you for the information!

21st Century Moose said:

This random number table doesn't look anything special - it's just all numbers from 0 to 255 randomly shuffled. The kind of thing you could quite trivially create yourself, in other words, and there's no reason to copy from Doom.

It would make sense to copy Doom's random numbers for compatibility reasons (i.e. a source port that aims for very strict emulation), but in any other case you are only “copying” the general algorithm of using a lookup table containing a random permutation and generating your own random permutation is a simpler and higher quality option than copying one (maybe incorrectly).

Omae Wa Mou Shindeiru

This topic is closed to new replies.

Advertisement