Long story short. My levels tiles currently look like this:
And i want them to look like this:
My levels are designed as 400x400 squares of proceduraly generated 0's and 1's, 0 representing dirt(walkable by player), 1 represeting stone(impenetrable). Game itself looks a lot like this.
At first, my method was to run another loop - after generating the world that replaced stone tiles, depending on directions of empty tiles were, with wall. The method doesn't work so bad up to the point where there are 1 wide walls sticking out, which are impossible for it to convert, check picture:
As you can see, in my method, the wall is an another texture, taking one tile itself. I can't replace air with walls, as that could possibly obstruct a passage. It basically fails every time there are 3 or more dirt tiles directly next to it.
This is the place at which i wondered if i chose the right method or if i should change the whole design for the walls, if so - to what? Should i create some textures for the 1-wides alone? Or maybe i shouldn't generate 1-wides at all? How do games generally deal with this?
I've looked for the answer to my problem, and haven't found it. Probably because it's hard for me to word it(sorry for messy post).