Knuckle Cracker

Creeper World => Chronom Mission Discussion => Topic started by: pasqualz on December 20, 2010, 03:14:02 PM

Title: How are Chronom maps generated?
Post by: pasqualz on December 20, 2010, 03:14:02 PM
I did a pretty large number of searches before posting this because I can't believe it hasn't been dicussed here. Nonetheless, I cannot find a discussion about how the chronom maps are generated. I just want to know for my own cusiosity because I find it amazing.
Thanks
Pasqual
Title: Re: How are Chronom maps generated?
Post by: mthw2vc on December 20, 2010, 03:30:32 PM
They're generated from Perlin Noise (http://en.wikipedia.org/wiki/Perlin_noise), reduced to a number of values that become the elevations, emitter statistics, totem and upgrade locations, and spores.
Title: Re: How are Chronom maps generated?
Post by: Grauniad on December 20, 2010, 03:46:48 PM
Quote from: pasqualz on December 20, 2010, 03:14:02 PM
I did a pretty large number of searches before posting this because I can't believe it hasn't been dicussed here. Nonetheless, I cannot find a discussion about how the chronom maps are generated. I just want to know for my own cusiosity because I find it amazing.
Thanks
Pasqual

First mention:  FusionSpace Saga (http://knucklecracker.com/forums/index.php?topic=307.0)
Title: Re: How are Chronom maps generated?
Post by: knucracker on December 21, 2010, 02:36:55 PM
Noise... specifically Perlin noise (as mentioned) is used.  Perlin noise is a mathematical function that can be used to generate what looks like "fog" or clouds.  Take a look at the attached image.  It's black and white and looks kinda like fog.  Now imagine it is a terrain you are looking down on from the sky.  The dark areas are valleys and the white areas are hill tops.  The grays in between are varying heights of terrain. The darker the lower, the lighter the higher.

Now imagine defining 4 brightness ranges.  Anything below a certain brightness gets level 0.  Anything slightly higher gets level 1... and so on.  These levels become the terrain in a CW map.  It really is just that simple.

Emitter placement comes in 8 flavors (one of 4 sides, or one of 4 corners).  Odin city placement is always opposite the emitter placement.  Totems  are pseudo-random and on the other half of the map from odin city.  Odin city also always plops down a square of flat terrain underneath itself in case it is placed on the edge between two levels of terrain.

Amazing, isn't it, how such a simple math routine can produce such an interesting collection of maps... maps that seem far more complex than the original math routine would seem to indicate.  It's a wonderful and complex universe we live in :)

In CW2, I again am using Perlin noise.  This time to define caves, boulders, etc.  Emitter placement means searching the resulting map to find the "caves" (another interesting algorithm) and then putting the emitters inside the caves.... etc.

These kinds of algorithms are some of the most fun aspects of game development.  Menus I hate doing... AI, map generation, path finding, physics.... that's where the real fun is (for me anyway).
Title: Re: How are Chronom maps generated?
Post by: WreeperCorld on April 10, 2011, 06:31:19 PM
I touched a bit at the whole simple logarithm/complex structure thing in my philosophy studies at college.
Yes, it touches philosophy. Wonderful, fascinating stuff.
Title: Re: How are Chronom maps generated?
Post by: thepenguin on April 10, 2011, 06:33:41 PM
I beleive the whole thing (if virgil and I do it the same way) is a system of biased averages