Changes between 1.10s and 1.10
#90
Ferengi,Nov 9 2003, 06:17 AM Wrote:Nope, it is caused by poor random number generation code.  The "standard" code is to divide your big range random number into a small range, but this causes "2-point correlation", i.e.  successive numbers strongly tend to be the same.   About 99% of programmers have never heard of these basics, which are well discussed in their classic literature -- i.e. those boobs cannot read.
I think you are being rather harsh, and rather confident given how little is known about all the facts. When writing code you have to measure the gain versus the effort to achieve that gain. In general it matters little that _true_ random numbers are not obtained. In the case of crypto, you need to spend the effort to get true random number generation. In the case of a game like this, the code is probably optimized for speed (there are a lot of random number calls in the game), or optimized for developer efficiency :). I wouldn't call someone a boob for not worrying about some non-randomness. It won't affect game sales, hardly affects game performance, and it could be a reasonable amount of effort (or be computationally prohibitive) to get a high-quality distribution. I wouldn't fault the engineering decision even assuming that they have made exactly the same 'mistake' as you claim.

Regardless, can you explain a bit better? First, the standard call to rand() returns a number which is supposedly evenly distributed between 0 and 1. This is generally multiplied to get the range that you want. You suggest it is the reverse. While I'm not saying that you are wrong about standard random number generation, your explanation is lacking (dividing a large range into a small range is uniform for floats except for round-off error, which should not be ultimately significant with a single division unless the range is very small). Can you clarify? I'd also be interested in a reference if you have one handy, even though I don't know that it tells us anything about how Diablo2 runs. The implementations of rand() have changed a lot since the classic literature anyway. Hasn't 'classic' RNG mostly been replaced by instructions on the processor?

Your explanation is so terse that it appears you read something once and are now trumpeting it, throwing out a technical term coupled with an implausible explanation because you wish to sound smarter than others. Provide some more detail so it doesn't appear that way anymore. Realize that it still doesn't necessarily tell us much about the case in question unless information about Diablo2 in particular is provided.

There have been a lot of indications that positioning affects random number rolls (at least back in the classic days), so I don't think they are using a standard call anyway. I'd guess their implementation avoids floats altogether. Were you perhaps referring to a 'standard/classic' algorithm? They may in fact be using something like that. Which one exhibits 2-point correlation in particular?

Are there any knowledgeable modders that can help here? Maybe some true CS guys?

EDIT: By true CS guys I mean as contrasted with myself as an electrical engineer who codes for a living. I don't mean to say that Ferengi is not a 'true' CS guy.
Reply


Messages In This Thread
Changes between 1.10s and 1.10 - by MongoJerry - 10-29-2003, 01:23 AM
Changes between 1.10s and 1.10 - by Guest - 10-29-2003, 01:53 AM
Changes between 1.10s and 1.10 - by adeyke - 10-29-2003, 02:00 AM
Changes between 1.10s and 1.10 - by MongoJerry - 10-29-2003, 02:31 AM
Changes between 1.10s and 1.10 - by mattis - 10-29-2003, 03:41 AM
Changes between 1.10s and 1.10 - by Guest - 10-29-2003, 04:01 AM
Changes between 1.10s and 1.10 - by mattis - 10-29-2003, 04:54 AM
Changes between 1.10s and 1.10 - by adeyke - 10-29-2003, 05:35 AM
Changes between 1.10s and 1.10 - by MongoJerry - 10-29-2003, 08:43 AM
Changes between 1.10s and 1.10 - by Crystalion - 10-29-2003, 11:06 AM
Changes between 1.10s and 1.10 - by Guest - 10-29-2003, 11:52 AM
Changes between 1.10s and 1.10 - by mattis - 10-29-2003, 01:29 PM
Changes between 1.10s and 1.10 - by Nicator - 10-29-2003, 02:07 PM
Changes between 1.10s and 1.10 - by adeyke - 10-29-2003, 02:16 PM
Changes between 1.10s and 1.10 - by adeyke - 10-29-2003, 02:18 PM
Changes between 1.10s and 1.10 - by Raziel - 10-29-2003, 02:25 PM
Changes between 1.10s and 1.10 - by Nicator - 10-29-2003, 03:00 PM
Changes between 1.10s and 1.10 - by MongoJerry - 10-29-2003, 06:48 PM
Changes between 1.10s and 1.10 - by Guest - 10-29-2003, 07:52 PM
Changes between 1.10s and 1.10 - by GenericKen - 10-30-2003, 12:02 AM
Changes between 1.10s and 1.10 - by Crystalion - 10-30-2003, 04:21 AM
Changes between 1.10s and 1.10 - by TheDragoon - 10-30-2003, 05:32 AM
Changes between 1.10s and 1.10 - by Pren - 10-30-2003, 01:25 PM
Changes between 1.10s and 1.10 - by TheDragoon - 10-30-2003, 07:52 PM
Changes between 1.10s and 1.10 - by Pren - 10-30-2003, 08:57 PM
Changes between 1.10s and 1.10 - by Ruvanal - 10-30-2003, 10:47 PM
Changes between 1.10s and 1.10 - by TheDragoon - 10-30-2003, 11:53 PM
Changes between 1.10s and 1.10 - by MongoJerry - 11-01-2003, 12:56 AM
Changes between 1.10s and 1.10 - by jahcs - 11-01-2003, 01:36 AM
Changes between 1.10s and 1.10 - by adeyke - 11-01-2003, 01:46 AM
Changes between 1.10s and 1.10 - by Guest - 11-01-2003, 02:06 AM
Changes between 1.10s and 1.10 - by LucianDK - 11-01-2003, 10:48 AM
Changes between 1.10s and 1.10 - by south - 11-01-2003, 12:10 PM
Changes between 1.10s and 1.10 - by Crystalion - 11-01-2003, 12:56 PM
Changes between 1.10s and 1.10 - by Hammerskjold - 11-01-2003, 03:01 PM
Changes between 1.10s and 1.10 - by Guest - 11-01-2003, 03:16 PM
Changes between 1.10s and 1.10 - by schizoidmime - 11-01-2003, 05:04 PM
Changes between 1.10s and 1.10 - by GenericKen - 11-01-2003, 10:07 PM
Changes between 1.10s and 1.10 - by Guest - 11-01-2003, 11:31 PM
Changes between 1.10s and 1.10 - by Crystalion - 11-02-2003, 05:53 AM
Changes between 1.10s and 1.10 - by adeyke - 11-02-2003, 06:39 AM
Changes between 1.10s and 1.10 - by Guest - 11-02-2003, 04:59 PM
Changes between 1.10s and 1.10 - by Guest - 11-02-2003, 05:10 PM
Changes between 1.10s and 1.10 - by TheDragoon - 11-02-2003, 08:34 PM
Changes between 1.10s and 1.10 - by Brista - 11-03-2003, 01:57 AM
Changes between 1.10s and 1.10 - by adeyke - 11-03-2003, 02:08 AM
Changes between 1.10s and 1.10 - by MongoJerry - 11-03-2003, 02:18 AM
Changes between 1.10s and 1.10 - by Ruvanal - 11-03-2003, 02:30 AM
Changes between 1.10s and 1.10 - by Epi - 11-03-2003, 08:00 AM
Changes between 1.10s and 1.10 - by Occhidiangela - 11-03-2003, 08:30 PM
Changes between 1.10s and 1.10 - by Occhidiangela - 11-03-2003, 08:34 PM
Changes between 1.10s and 1.10 - by Velius - 11-04-2003, 06:44 AM
Changes between 1.10s and 1.10 - by MongoJerry - 11-04-2003, 08:14 AM
Changes between 1.10s and 1.10 - by Walkiry - 11-04-2003, 10:20 AM
Changes between 1.10s and 1.10 - by Guest - 11-04-2003, 04:32 PM
Changes between 1.10s and 1.10 - by Bhima - 11-04-2003, 05:38 PM
Changes between 1.10s and 1.10 - by Crystalion - 11-04-2003, 07:40 PM
Changes between 1.10s and 1.10 - by MongoJerry - 11-04-2003, 07:49 PM
Changes between 1.10s and 1.10 - by Guest - 11-04-2003, 08:02 PM
Changes between 1.10s and 1.10 - by librarian - 11-05-2003, 12:20 AM
Changes between 1.10s and 1.10 - by Velius - 11-05-2003, 02:12 AM
Changes between 1.10s and 1.10 - by librarian - 11-05-2003, 02:51 AM
Changes between 1.10s and 1.10 - by Bhima - 11-05-2003, 04:52 PM
Changes between 1.10s and 1.10 - by AssA - 11-05-2003, 08:15 PM
Changes between 1.10s and 1.10 - by Crystalion - 11-05-2003, 09:39 PM
Changes between 1.10s and 1.10 - by Brista - 11-05-2003, 09:45 PM
Changes between 1.10s and 1.10 - by MongoJerry - 11-06-2003, 01:46 AM
Changes between 1.10s and 1.10 - by Crystalion - 11-06-2003, 04:04 AM
Changes between 1.10s and 1.10 - by Flymo - 11-06-2003, 03:50 PM
Changes between 1.10s and 1.10 - by Olon97 - 11-06-2003, 06:54 PM
Changes between 1.10s and 1.10 - by Guest - 11-06-2003, 07:08 PM
Changes between 1.10s and 1.10 - by Brista - 11-06-2003, 07:11 PM
Changes between 1.10s and 1.10 - by Guest - 11-06-2003, 07:13 PM
Changes between 1.10s and 1.10 - by par_deus - 11-06-2003, 07:14 PM
Changes between 1.10s and 1.10 - by Brista - 11-06-2003, 08:16 PM
Changes between 1.10s and 1.10 - by Crystalion - 11-06-2003, 08:30 PM
Changes between 1.10s and 1.10 - by librarian - 11-07-2003, 12:23 AM
Changes between 1.10s and 1.10 - by librarian - 11-07-2003, 12:45 AM
Changes between 1.10s and 1.10 - by GenericKen - 11-07-2003, 12:54 AM
Changes between 1.10s and 1.10 - by MongoJerry - 11-07-2003, 03:10 AM
Changes between 1.10s and 1.10 - by Smoketest - 11-08-2003, 08:15 PM
Changes between 1.10s and 1.10 - by Guest - 11-08-2003, 10:22 PM
Changes between 1.10s and 1.10 - by Baal - 11-09-2003, 02:22 AM
Changes between 1.10s and 1.10 - by pmpch - 11-09-2003, 03:06 AM
Changes between 1.10s and 1.10 - by Ferengi - 11-09-2003, 01:01 PM
Changes between 1.10s and 1.10 - by Ferengi - 11-09-2003, 01:12 PM
Changes between 1.10s and 1.10 - by Ferengi - 11-09-2003, 01:26 PM
Changes between 1.10s and 1.10 - by vor_lord - 11-09-2003, 02:35 PM
Changes between 1.10s and 1.10 - by Ruvanal - 11-09-2003, 04:54 PM
Changes between 1.10s and 1.10 - by MongoJerry - 11-09-2003, 05:46 PM
Changes between 1.10s and 1.10 - by Aello - 03-13-2004, 03:06 AM
Changes between 1.10s and 1.10 - by Obi2Kenobi - 03-14-2004, 04:59 PM
Changes between 1.10s and 1.10 - by Aello - 03-15-2004, 08:17 AM
Changes between 1.10s and 1.10 - by Jarulf - 03-15-2004, 01:57 PM
Changes between 1.10s and 1.10 - by adeyke - 03-15-2004, 03:33 PM
Changes between 1.10s and 1.10 - by Ruvanal - 03-15-2004, 09:12 PM
Changes between 1.10s and 1.10 - by Aello - 03-16-2004, 12:38 AM
Changes between 1.10s and 1.10 - by Jarulf - 03-16-2004, 06:14 AM
Changes between 1.10s and 1.10 - by lemekim - 03-16-2004, 07:55 AM

Forum Jump:


Users browsing this thread: 4 Guest(s)