General > Discussion
UFO: Female Invasion?
Duke:
I don't know the current implementation of MS rand(), as it's not OSS ;)
For large numbers eg. a million, the random distribution seems ok.
But it seems to produce unusual long *series*. That is, for small numbers, eg. 20 draws, you may end up with 16 females in a row, followed by 13 males. (I'm exaggerating a bit to make it clear).
Maybe someone wants to google for the latest findings about MS rand() ?
Bartleby:
u could make it like this:
- all odd new persons are 75% male
- even persons are 75% female
so every 2nd person has a good chance to be not the same gender as the one before.
poppadrake:
But unless gender effects the stats distribution, does it really matter? Can we tie in a limiting parameter on gender? ie. if gender=male then strenth would be a random stat in a range 25% higher than if gender=female? And if gender=female then sniping (or intelligence! ;D) would be random in a range 25% higher than male? Then gender would matter, and Bartley's suggestion should work quite nicely to even out the gender trends.
Destructavator:
--- Quote from: Duke on January 27, 2010, 05:42:03 pm ---Maybe someone wants to google for the latest findings about MS rand() ?
--- End quote ---
I've actually already done that, when I was learning (on Windows, MS) and what I've been describing is part of how it works, needing to set a seed first. The MS system for random number generation is indeed awful, and can produce predictable results more often than it should.
Regardless, if a different implementation is used in this project anyways (which is what it sounds like), then the issue obviously isn't with the MS rand() function because we don't use it in this game.
Destructavator:
Side Note: What is a good way of getting random numbers anyways? One that's cross-platform and not tied to MS?
I could really use something like that for another project...
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version