jcp@brl-tgr.ARPA (Joe Pistritto <jcp>) (12/30/84)
I noticed almost immediately on playing OGRE that the odds of destroying things seemed low. The thing I did most often was fire at the treads, with a success rate of like 1 in 5. Looking at the logic, I noticed that it should have been 1 in 3. A little experimentation showed that the RAND() function does not return an evenly distributed set of numbers in the range of 0 to 5 (rand() % 6), used in the roll() routine. Replacing SRAND/RAND with the Berkeley SRANDOM/RANDOM calls evened up the odds nicely. About 1 in 3 as expected. The calling syntax is identical, just the algorithms better. Try it for a more interesting game. Speaking of interesting mods, how about making 'Damaging' the treads take away that many treads, but only for one turn. That would slow down the OGRE, but not kill it (unless it was very low anyway) -JCP-