Jump to content

  • Log In with Google      Sign In   
  • Create Account


2D Tree Placement on Map


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 shadowgamesco   Members   -  Reputation: 326

Like
0Likes
Like

Posted 02 September 2012 - 03:34 AM

I have an Island Generator that generates islands that look similar to this:

Posted Image

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.

Sponsor:

#2 phil_t   Crossbones+   -  Reputation: 3261

Like
1Likes
Like

Posted 02 September 2012 - 04:19 AM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS