Thread: Wilderness
View Single Post
Old 01-17-2003, 11:20 AM   #3
KaVir
Legend
 
KaVir's Avatar
 
Join Date: Apr 2002
Name: Richard
Home MUD: God Wars II
Posts: 2,052
KaVir will become famous soon enoughKaVir will become famous soon enough
Well you can't really have an infinitely big wilderness/world, but you can certainly have some pretty large ones - for example in my implementation everything is measured in feet, yet the main plane of existence is 2.7 times the diameter of the earth, and it would take 136 years (real time) for a character to walk all the way around it.  It didn't need to be that big, but that's just the way it worked out (with a 32 bit integer representing a coordinate location - using a 16 bit integer would have resulted in a world only 1 mile in circumference, which was just too small for what I wanted).

Of course if I really wanted to, I could quite easily change the coordinates to use 64 bit integers, giving me a world over 92.5 trillion miles in diameter.  To put that in perspective, that's over a hundred million times the diameter of the sun, and over ten thousand times the diameter of our solar system.  If you dug a tunnel through the centre of such a world, it would be around 3.5 times the distance between our solar system and the nearest star.  The time it would take for a character to walk all the way around such a world would be roughly equal to 40 times the currently estimated age of the universe.  For all intents and purposes, that's as good as "infinite".

When you're talking about extremely large worlds like I described above, it starts becoming unrealistic to map stuff yourself - or even to save automatically generated terrain features.  There are simply not sufficient resources to do this, so you need to cheat.

The approach I would recommend is to use psuedo-random numbers calculated from coordinate positions and a global seed to calculate regular terrain features, and then temporarily save changes to the world (so they would come back after a while) - persistence is unfortunately not really feasible when you're talking about such a large world.  You could then place your builder-created places of interest at various locations within the overall world, and even allow players to create such places themselves if they wished (for example, building a castle).  Other places might be randomly generated by the mud to represent mob villages and the like.
KaVir is offline   Reply With Quote