I am working on a simple 2D top down tile based game where a tile is either "floor" or "wall." A good example of what I want is the oldschool Alien Assault:
Now my question is - how do I create the wall tiles? If I was just to hand-draw these then it would mean 256 different wall tiles (since each tile is surrounded by 8 tiles that can be wall or floor, so 2^8 = 256). Even if I do some mirroring/rotating, it's still seems like an annoying amount of tiles (especially laying those out onto a tilesheet to fit some auto-matching algorithm).
Is there a better way of doing this, or is that pretty much how most 2D games do it?
One other idea I had was to (just for rendering) subdivide each tile into 4 and treat each corner separately. Since you always know the corner will have at least two surrounding walls you only need 4 variants per each corner, meaning 16 images total:
Looking at RPG maker tilesets I am guessing this is how they do walls, as all you need is this:
To create something like this:
The only CON here is that, since the walls would be using a lot more smaller pieces, they could get easily very repetitive, unless I introduce few variants for each of the pieces and randomize it?
Any input from the more experienced is appreciated.
(also, I did try searching but oddly having a hard time finding tutorials for this topic. Ho hum!)\
EDIT: actually here is a the RPGMaker autotile explanation, which is basically what I jsut figured out above lol: http://blog.rpgmakerweb.com/tutorials/anatomy-of-an-autotile/
Edited by Koobazaur, 19 July 2014 - 12:58 AM.