General > Discussion

UFO: Female Invasion?

<< < (2/10) > >>

poppadrake:
Accurate strength stats would be a nice addition...but a touch hard to swing if gender assignation is random.  My troops seem to be split 60/40 male/female...but no female scientists or laborers.  Doesn't really matter to the game play though.  Would matter much more probably if the stats were accurate. Hmm.

Destructavator:
This seems to be contagious, whatever it is - I've been starting a lot of new games to test things lately and get a lot of female soldiers in the lists and less male soldiers.

I'm wondering if the seed for random picking needs to be adjusted or something.

Although I'm not an experienced coder compared to some others here, in my experience when I need to determine random numbers in C/C++ using just the rand() function I sometimes get the same results repeatedly, until I start "mixing" the seed with other program variables, which usually solves the problem.  By "mixing" I'm talking about adding, multiplying, etc. the seed number with several unrelated other variables that could be anything, even if they aren't related (such as exact "X" screen coordinate of the mouse cursor, for example...).

If I just base it off of elapsed time in seconds like some people do, I often get same, predictable results repeatedly, which can cause things like this.

Just a suggestion.

Duke:
The rand() implementation in Windoze is known to be not truely random.
But afaik it doesn't depend on the seed.

Destructavator:

--- Quote from: Duke on January 26, 2010, 02:55:09 am ---But afaik it doesn't depend on the seed.

--- End quote ---

Then what is the seed for?  I'm not saying you're wrong, but in my personal studies and research on random numbers a seed should first be set before a random number is called, or set to NULL.

What am I missing here?
 ???

poppadrake:
Realistically though, there are only two genders to choose from.  Won't the trend naturally swing back and forth?  The stats aren't dictated by gender so capabilities seem to be sufficiently random. And wouldn't connecting random number initialization to time be random enough?  Mouse cursor tends to begin from the same area because it generally remains in the same area...the Icon you start the game from...or maybe not.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version