Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (780)
Games in Android Showcase (233)
games submitted by our members
Games in WIP (857)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Tile maps - generating islands or continents?  (Read 4649 times)
0 Members and 1 Guest are viewing this topic.
Offline markww

Junior Newbie

Medals: 1

« Posted 2012-08-25 13:39:02 »


I have a 2d tile game, and I'd like to generate random maps (of size 100x50). I'd like to be able to create small islands, or large continents.

It seems like a standard way to do this is to use perlin noise. You generate a random heightmap, pick a threshold for the water line, and assign tiles their terrain type from that.

Looking at perlin noise implementations, I can't find a description of the domain of the different parameters, or how/if they can be combined to generate small islands vs large continents. Perlin noise seems to have a few parameters:


Is anyone familiar enough with this to describe them, and how they can be combined to create the "clump" size I'm after? I found a posting by a member here that made an interactive demo of perlin noise:

but I'm basically just playing with the parameters without really knowing what they're doing. I'm not even sure what the min/max range of each of the above params can be.

I found this article which is pretty much exactly what I want:

but the author is using flash which has a perlin noise function built in, so I'm not sure how its version of perlin noise and its parameters map to a .. "standard"? version of perlin noise. The author says:

"Generate a Fractal Grayscale Perlin Noise with an x-frequency of half the width, a y-frequency of half the height, and 8 octaves. For more loose islands, or for larger maps, you can drop the frequency to 1/4th of the width and height or lower, to fit your purposes."

Matching that up with the sample applet from the above user didn't yield expected results.

If anyone is knowledgable about this it'd be awesome to get a clear description memorialized on the nets.

Thank you
Offline Best Username Ever

Junior Devvie

« Reply #1 - Posted 2012-08-25 17:03:55 »

Persistence, frequency, amplitude, and octaves are not relevant to Perlin noise. Perlin noise basically just calculates "random" values at specific locations on a grid and tries to smoothly interpolate values between points on the grid (1D, 2D, 3D, etc.) The four values you describe are used with all kinds of noise and are part of a noise layering pattern, not a noise generation pattern. The process will work with any type of noise.

Amplitude is proportional to the "height" of the original noise layer. Frequency (1 / period) determines the distance between "hills." The period is the actual distance. It's often constant between different layers but doesn't need to be. Persistence is how much the amplitude "decays" between each layer. It can be done using amp = amp * persistence; (0 < persistence < 1). Octaves is the number of layers of noise you use. Since the amplitude decays between layers, it acts like a geometric series. If you used an infinite number of octaves, then the highest octave would have an infinitesimally small (almost zero) amplitude and the lowest/first octave/layer would have a height equal to amplitude. Since the amplitude decreases, the number of octaves determines the "detail" of the final layered noise pattern.
Offline Nolithius

Innocent Bystander

« Reply #2 - Posted 2012-10-19 18:53:21 »

Hey markww,

Nolithius from here.

In your applet, over at, it looks like the following terminology is used:

Applet -> Flash
Persistence -> ?
Octaves -> Octaves
Horizontal Scale -> x-frequency AND y-frequency
Vertical Scale -> amplitude (not used in Flash, basically a multiplier to polarize the values).

Hope that helps!

Ebyan "Nolithius" Alvarez-Buylla

Pages: [1]
  ignore  |  Print  

hadezbladez (742 views)
2018-11-16 13:46:03

hadezbladez (381 views)
2018-11-16 13:41:33

hadezbladez (734 views)
2018-11-16 13:35:35

hadezbladez (192 views)
2018-11-16 13:32:03

EgonOlsen (2392 views)
2018-06-10 19:43:48

EgonOlsen (2553 views)
2018-06-10 19:43:44

EgonOlsen (1478 views)
2018-06-10 19:43:20

DesertCoockie (2143 views)
2018-05-13 18:23:11

nelsongames (1945 views)
2018-04-24 18:15:36

nelsongames (2625 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!