Tom Proudfoot
Posts: 1357
Joined: 4/25/2000 From: Alameda, CA Status: offline
|
Short answer: the rolls are just as random as any other game. Long answer/treatise: We have to go into some technical stuff. Unless computers have a specific chip (and PCs don't), they don't really have a way to get random numbers. To get around this, people have made pseudo-random functions, which are complicated mathematical messes which give you back a different number from 0-1 each time you check them. But the first time you run your program and check it you get, say, 0.213278, the second time 0.458175, and these are the same numbers each time -- if you start at number #1 on this virtual 'list'. It's not really a list in the sense that these numbers are all written down somewhere but it is a list in that they COULD be written down somewhere if you went through them one by one and wrote them down. Having the same numbers each time is usually pretty awful for games, so what we do is tell the computer to not start at #1 each time. You could do this by using the current time, or the mouse position, or how long it takes somebody to click 'start', or any number of ways. This is called the 'seed'. And if the same seed (say 57732) gets plugged into the random function, you get the same number back each time (say, 0.429472). So far so good, right? Now, what happens if you are playing somebody in multiplayer, and you want the combat to come out the same on both computers? You have two choices - you can run it all on one computer and then send over the results - which means that the other player is going to have to wait for you to finish everything and then get some kind of command to replay it on their screen - or, to make the game a little more lively, we can exploit this random number seed thing by sending over the command to START all the combat stuff along with what seed we used to do it. Then the other player plugs that seed in and their random numbers are going to be the same as the other player and they then get the same results at about the same time instead of having to wait for a while. Because of this seed being used for multiplayer games, we're always keeping careful track of it. It seemed like it would be useful, therefore, to save it in the save file, so that when somebody reports a bug and sends a file, when I load up their save it will load up the current seed they were on and then the game would do the exact same thing for me that it does for them. And this has been, and continues to be, incredibly useful for fixing bugs. But what it does mean is that when YOU load a save it picks up at the same spot each time. However, each time you do something that asks for a random number, your spot on this virtual list of numbers is shifted. If you save it right before shooting a shot with a vehicle, and then shoot and, say miss, and then reload it will be the same die roll. But if you, say, Pass instead and try again on the next impulse it will probably be different because the AI is running through a bunch of random numbers when it does its thing. I do have to, as an aside, wonder how fun it is to be constantly saving and reloading results that you are not happy with. I basically never do this, in any game. There's no shame in lowering the difficulty. But that's a different philosophy, I guess. Anyway, to sum up, there is no actual list of numbers that the computer is consulting to make its choices, or that come out the same for each game. You could think of the random numbers as being on a 'virtual list', I suppose, given how they are generated (and I hope my explanation of that whole process makes sense) but every computer game does this because computers suxs at random, yo. But nobody knows what numbers are going to come out are so they are basically just as random as real dice unless you subscribe to some kind of destiny prophecy or something. Lastly, your real dice are probably worn down on one edge and not as random as you think. I have a d20 from ~1983 that rolls 17s about 40% of the time.
|