• Advertisement
Sign in to follow this  

2D Tree Placement on Map

This topic is 1964 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have an [url="http://breinygames.blogspot.com/2012/06/generating-terrain-using-perlin-noise.html"]Island Generator[/url] that generates islands that look similar to this:

[img]http://4.bp.blogspot.com/-U03l0yXpeIs/UEMleEgeDVI/AAAAAAAAAOI/_GxssdtK1VU/s1600/Screen+shot+2012-09-02+at+3.21.19+AM.png[/img]

It's pretty obvious to tell where the deep/shallow water areas are, but the green areas represent a transition of grassland to dense forest, with the darker green areas representing more dense areas of forest.
The islands are pretty cool and the generator is very consistent so I'm happy with all my hard work on it. I've also completed the next step of turning the islands generated into full-scale tiled worlds for a game I'm working on. My problem, however, is I actually don't have a great idea of how to do the tree placement on the tiled map for islands like this. How can I place the trees more spaced out in the lighter green areas, with them more close together in the darker green areas where the forest is supposed to be more dense?

Any suggestions would be great! Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
You could use a poisson disc to represent the random tree distribution. You could make it a certain size, then "tile" it over the terrain.

Then, associate a random number (say between 0 and 1) with each point on the poisson disc. Then, in the lighter green areas, say only trees spawned from a poisson point greater than 0.8 will show up. In medium green, say 0.5, and in dense forest areas, all of them show up.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement