[MUD-Dev] Algorithms for an Infinite Universe

Joel Kelso joel at ee.uwa.edu.au
Tue Oct 12 09:44:03 CEST 1999


Jp Calderone wrote:

> > A quick copy-paste into a text file and his pseudo-random
> > generator returns all zeros for the random numbers. Sad.
> >
> > Quzah.
> >
> 
> That is pretty sad.  I read the article, but didn't get as far
> as trying any of his code.
> 
> Don't dimiss Algorithmic play-space generation based on one
> poor explanation of it though.  I'm working on a game now that
> pretty much generates everything using the principle, and it is
> working great so far.  With a /functioning/ prandom sequence
> generator you can do great things, one of the neatest (imho)
> being the fact that you can represent your entire game-space
> as a single sequence-seed.

I noticed at one point in the above mentioned article that the
author states that "... it's too computationally intensive to use
for large maps".  This needn't be the case.  If you use the usual
"divide-into-quadrents-peturb-height" method, but base the
hight peturbation on a hash function of the point's co-ordinates,
rather than numbers from a random sequence, you can extract the
height for any point in a very large play-space quickly ("quickly"
in this case is based on the logarithm of the play-space size).

Take a peek at

http://ciips.ee.uwa.edu.au/~joel/ideas/fmap.html

for an example implementation of this.  I can dig out the source if
anyone's interested.

-- joel at ee.uwa.edu.au ------------------------------------------
"I went to see the pool of wisdom but it was empty.  Someone has
 drained the pool of wisdom." - Todd Jones
-- http://ciips.ee.uwa.edu.au/~joel ----------------------------



_______________________________________________
MUD-Dev maillist  -  MUD-Dev at kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list