• ### Announcements

GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Followers 0

# Spreading out continents in a Perlin noise-based terrain generator

## 5 posts in this topic

I made a terrain generator for a game. It makes some nice terrains with water, land, and mountains. However something seems off about the output. After some thought I figured it out: there are too many little islands laying around for it to look realistic. You don't see that on a real world map.

Is there a "clean" way to solve this problem? I could simply calculate the size of every landmass, declare the larger ones as continents, and then delete all the smaller islands within X distance of the continents, but that feels like a hack so I'm wondering if anybody has a better idea. Thanks in advance.

Example file: http://i.imgur.com/QRwU4Bg.jpg (warning: it's almost 5 megs in size)

0

##### Share on other sites

One typical way to tweak the perlin noise terrain to make it look right is to simply add (or subtract) a constant offset from the function, thereby literally raising or lowering the sea level. If you raise it, you should get a lot more water and much fewer tiny islands. Also, your perlin noise does seem a bit off, are you sure you are reducing the amplitude properly as the frequency increases? You seem to have some pretty sharp peaks, normally perlin noise is a bit smoother.

Another more advanced method is to take your mesh and smooth it out a little bit to simulate erosion (such as an average, or a rule which lowers a point's height depending on neighbouring heights) which would tend to get rid of the small islands while only eating a little bit at the large continents. It is mostly tweaking, really, there is no magic setting that'll make things look earth-like.

1

##### Share on other sites

You can do a few passages of smoothing pixel by pixel: you take a couple of peeks and begin smoothing the surrounding pixels.

Example, say a peek for you map is a height value of  9: the surrounding pixels might have 8, then 7, then 6 and so on.

from this randomic noise:

9 8 6 0 8 5 2
4 2 7 2 0 7 3
1 4 2 6 2 4 0
2 4 2 0 9 3 9
3 9 1 9 2 0 2
8 2 5 2 0 4 2

to this (choosing a high value of 9 in row 3, col 4

5 6 6 6 6 6 6
5 6 7 7 7 7 7
5 6 7 8 8 8 7
5 6 7 8 9 8 7
5 6 7 8 8 8 7
5 6 7 7 7 7 7



this will generate a mountain with smooth degradation: with a couple of these your map will probably looks better. Choosing a minor peek you will be able to preserve more water, but you can also do the inverse and choose the lowest value (this will create an abyss on your map). Play with it.

2

##### Share on other sites

If your height function only contains high frequencies, you would get a lot of little islands. This suggests that maybe you need to add some lower frequencies to your Perlin noise. Perhaps that's not enough to solve your problem, but I think it would probably help.

1

##### Share on other sites
You could do 2 passes. The first pass with low frequency and the second with higher frequency, adding them together. The first pass should have a higher weight than the second.
1

##### Share on other sites

One typical way to tweak the perlin noise terrain to make it look right is to simply add (or subtract) a constant offset from the function, thereby literally raising or lowering the sea level. If you raise it, you should get a lot more water and much fewer tiny islands. Also, your perlin noise does seem a bit off, are you sure you are reducing the amplitude properly as the frequency increases? You seem to have some pretty sharp peaks, normally perlin noise is a bit smoother.

Another more advanced method is to take your mesh and smooth it out a little bit to simulate erosion (such as an average, or a rule which lowers a point's height depending on neighbouring heights) which would tend to get rid of the small islands while only eating a little bit at the large continents. It is mostly tweaking, really, there is no magic setting that'll make things look earth-like.

I calculate the sea level after the terrain is generated, because there's a "land percentage" setting. I basically set it to zero and then raise it until the specified proportions are met, so that pixel in the terrain that's lower than that value will be set to water. This doesn't alter the noise.

You are correct though, I didn't change the amplitude. I just re-read the article where I learned Perlin noise from and realized I missed that step. Every layer goes from 0.0 to 1.0. I'll go correct that now and see how it looks.

You can do a few passages of smoothing pixel by pixel

Actually it does have a smoothing step. That particular map was smoothed for 16 passes if I recall correctly, but it's not peak-based as what you mentioned. I'll give that a try.

If your height function only contains high frequencies, you would get a lot of little islands. This suggests that maybe you need to add some lower frequencies to your Perlin noise. Perhaps that's not enough to solve your problem, but I think it would probably help.

There are both. I think my problem is what Bacterius said, I didn't alter the amplitude.

You could do 2 passes. The first pass with low frequency and the second with higher frequency, adding them together. The first pass should have a higher weight than the second.

Yep, that's what Perlin noise is. That map has 10 layers: 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, and 8.

Thanks everybody a ton!

0

## Create an account

Register a new account