News for hackers. Stuff that matters.
Re:Building an Infinite Procedurally-Generated World by halflings on Tuesday May 05, 2015 @07:58AM (#9491974)

    Once you have access to random 2D data, it’s pretty straight forward to convert that noise into usable data. Simply set up thresholds for each tile type you want to support, eg:
     
    * water if < 0.3
    * grass if >= 0.3 and <= 0.6
    * mountain if > 0.6
     
    I recommend leaving the upper and lower cases open. If they are not left open, you may end up with holes in your map for unexpectedly high or low values. An alternative is to clamp or scale the noise values when you generate them.
If you expect to have more tile types, you should probably consider a categorical probability distribution (something like: water: 0.3, grass: 0.3, mountain: 0.4) and sample from it (instead of "hard-coding" it with the test you're referring to)
Re:Building an Infinite Procedurally-Generated World by shawn42 on Tuesday May 05, 2015 @09:18AM (#9492281)
I like your idea here. I think the downside of this approach is you must scale your random data points by a scaling factor to get them in a known range.