Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (707)
Games in Android Showcase (206)
games submitted by our members
Games in WIP (781)
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 3779 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  
You cannot reply to this message, because it is very, very old.

Galdo (200 views)
2017-01-12 13:44:09

Archive (369 views)
2017-01-02 05:31:41

0AndrewShepherd0 (827 views)
2016-12-16 03:58:39

0AndrewShepherd0 (762 views)
2016-12-15 21:50:57

Lunch (901 views)
2016-12-06 16:01:40

ral0r2 (1129 views)
2016-11-23 16:08:26

ClaasJG (1232 views)
2016-11-10 17:36:32

CoffeeChemist (1281 views)
2016-11-05 00:46:53

jay4842 (1364 views)
2016-11-01 19:04:52

theagentd (1190 views)
2016-10-24 17:51:53
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 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!