Hacker News new | past | comments | ask | show | jobs | submit login

I think you could layer this approach to get some global structure.

Currently the probability of each tile is local * sphere. A simple approach would be to add some perlin noise on top to dictate different biomes, with each biome having their own tile probability distributions. Then the new tile probability becomes local * sphere * biome.

So in the ocean biome you might be less likely to get houses and other large structures. But islands and grass huts are ok. And obviously water tiles get a large probability boost.

Or… what if we took the tile approach further and have various scales of tile. Perhaps biomes are larger tiles (8x8) which also follow the same algorithm so that biomes have relationships to one another.




The larger worlds wouldn't even have to use larger tiles. Imagine you first create a "world" of tiles that describe biome. The tiles in this "world" set would be things like "plains", "mountain", "water", and obviously some transitions between these. Then for each pixel in the "world" you select the tileset probabilities by the kind of terrain that pixel represents, maybe with some influence from nearby pixels. This could of course be repeated as few or as many times as seems reasonable. For each level you go down the resolution would increase. If we stick to the 3x3 tiles from the original article we can then first generate a global "world" with 3x3 tiles, then populate each pixel in the "world" with a new 3x3 tile from the new set. So for each time you go up in resolution you 3x the size in each dimension.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: