Note that there are some explanatory texts on larger screens.

plurals
  1. POPseudo random for procedural generation
    primarykey
    data
    text
    <p>I'm making a game with a procedural map, and I'd like to apply this way of doing :</p> <p><a href="http://www.funstormgames.com/blog/2012/09/procedural-island-generation-for-ludum-dare-24/" rel="nofollow noreferrer">Procedural Island Generation</a></p> <p>It's easy to implement and the results are what I'm looking for.</p> <p>The only part I'm stuck with is the part 3, when I have to go around in circles and randomly change water to land, with a higher chance for the water to change into land when it touches a lot of land.</p> <p>I've tried to do like this :</p> <pre><code>if (rand() % 10 &lt; 3 + countAdjacentTile(x, y, LAND)) </code></pre> <p>the countAdjacentTile function just counts the number of tiles marked as the third parameter around the tile specified with the x and y coordinates.</p> <p>So there's still a chance for a water tile to change into a land tile if there's no land around it, and the chances are upper if there is land around.</p> <p>But it gives me this :</p> <p><img src="https://i.stack.imgur.com/olOAs.png" alt="enter image description here"></p> <p>while it gives this on the link I gave earlier :</p> <p><img src="https://i.stack.imgur.com/r7gSB.jpg" alt="enter image description here"></p> <p>I'd like to have the same kind of branches. Do you know the name of an algorithm for this ? I've read this : <a href="http://www.funstormgames.com/blog/wp-content/uploads/2012/08/procedural_island_step_3.jpg" rel="nofollow noreferrer">Exponential Distribution</a> But that's not really talkative for me...</p> <p>Thanks for reading so far.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload