NOTE: I am very new to game development and don't know if I'm using the right terminology here, so will try showing what I am trying to achieve.
Consider the image below. I want to be able to draw a cave-like level using auto-tilling (levels will be procedural). My goal is to draw the blueprint on the left and get the output on the right. Notice how the tiles have the illusion of height, yet they're 2D. The one in the middle is the one I'm struggling to achieve as I need both the top tile of the bottom leg and the bottom tile of the upper leg (blueprint tiles marked in green)
So far, here's what I learned:
tile rule
, even if I did, I wasn't able to solve the problem abovetile rules
from Unity and it doesn't seem like I can output tiles neighboring the input
base tile, even with Custom Tile Rule.I could create a code from scratch to iterate over a given tilemap and draw the individual objects myself, but it seems like I am reinventing the wheel here, and I'm trying to check if there's a better/recommended/conventional/built-in way to achieve the same result.
Your desired look and workflow is easily achievable with the default tools that Unity provides.
Take your rectangular sprite sheet, set Sprite Mode
to Multiple
and slice it up and adjust the pivot point if you like.
Add these new sprites to a tile pallet and start drawing on a Tilemap with a rectangular grid. You'll probably have to change the sort order to Top Left
or Top Right
.
Looks a bit ugly, cause I did it very quickly and by stealing your assets, but it's just a proof of concept.
You have mentioned that you want to make it procedural. There is plenty of material that goes into all the ins and outs about making procedural tile maps. I trust that you can take it from here.