Tag Info

Hot answers tagged


You say that you have problems with 1x1 tiles. Why not simply remove them, say by turning them into the same tile as one of its four immediate neighbours? for tile in map: if tile != tileAbove and tile != tileBelow and tile != tileLeft and tile != tileRight: tile = tileLeft On that note, the practice of transforming tiles based on their ...


As your map information is basically only height, you can simply convolve the map with a blur filter. There are several, computationally easiest might be a mean filter which assigns to each tile the average of all surrounding tiles: height(x,y) = ROUND( ( height(x-1,y-1) + height(x-1,y) + height(x-1,y+1) + height(x,y-1) + height(x,y) + height(x,y+1) ...

Only top voted, non community-wiki answers of a minimum length are eligible