Displaying tiles in tile map based on near tiles.

BlitzMax Forums/BlitzMax Beginners Area/Displaying tiles in tile map based on near tiles.

allranger(Posted 2013) [#1]
So I can create a fairly large 2D sideview map and scroll around it in. My tiles are 16x16 and right now I have ten of them. They are not very pretty, just solid colors, browns, greens and greys. I am just feeding the map creation process random numbers for the time.

I would like to make them look better. So if I have a tile that has blank space above it, I would like it to show an edge. If it is a tile that is sticking up it needs to show three edges.

So how do I choose what tile to display based on the other tiles surrounding it? I need something that is easy to expand because I plan on adding a large number of different tile types.

Has anybody come accross this problem before? It wasn't a problem when I was creating maps by hand but now that I am generating them, they don't look very nice.


Nest(Posted 2013) [#2]
I had the same problem and this article solved it perfectly

http://archive.gamedev.net/archive/reference/articles/article934.html