The main world change for 3D are of course the tiles, specifically walls and doors. Making tiles into 3D versions for the perspective camera means that I can take a whole lot of screenshots (and totally pad my blog post stats).
I can make a wall be a cube. Basically, add vertical tile-sized bits at the sides:
So now my tile world object prefab can point to all the potential “sides” of a tile:
For now, the side bits will get assigned whatever sprite the main bit has to see that it works:
There is some rendering redundancy (since you can’t see certain sides), but I’ll worry about it if it becomes an issue.
I can further adjust this to use side bits for walls:
I have to disable lighting now, because it messes with my sprite logic.
But the result is pretty decent:
I will have to think more about the wall sizes and such, but I’ll get to that later.
The big thing now is that I no longer have door tiles or combined wall-door sprites:
In fact, the tile prefab no longer has a “main” sprites that I restyle into a different one, because my side/top and wall bits are now all without neighbour-based fakery:
My assets are converted from having doors with direction-specific versions, to just a single door that I can reuse.
I also now specify sprites in its own asset (which is slight overkill, but I guess I can use it for theming later):
And there are now a lot of the door and wall-door sprites I no longer need:
This is awesome, because is reduces sprite asset requirements by a lot, at least the tedious door bits. The 6 sprites (floor, wall side, wall top, door side, door top, open door floor) now describe every possible thing in the game.
I do now need separate prefabs for walls and doors:
(Technically, doors are identical to walls, but I may change that if I ever get to using collider physics. Open doors are just floors.)
And it looks pretty good:
Including the open version (ignoring sprite sorting issues):
This was quiet a feature. It changes the visuals dramatically. And changes a lot of places around the codebase. Including lots of assets that make it all work together. I think I am making good time on this at the moment.
I now also need to adjust my room generation logic (again), since I can now overlap rooms again and no longer need weird double-sized walls or doors. I will cover this separately though, as there’s a bunch of things to tweak there.