One of the first features I’m working on is tiles (and maps and rooms) and how it all ties with the dungeon generation as a whole. To begin with, I’m starting very simple with just a bunch of tiles in a grid:
Note the slightly angled camera for that pseudo-2D look. I’m sure I will be tweaking it further a lot, but it gives the basic idea of what I am going for.
From there I can set up a basic dungeon generation pipeline and put tiles in some sort of order:
(There are also player and dummy enemy objects, but I’ll talk about that later.)
The way I plan to do the level layout is to have a grid of rooms (sort of like Binding of Isaac, but with more variable room shapes and camera is not fixed). Each room is a self-contained collection of tiles. The rooms then connect to each other, forming a dungeon.
So, to start it all off, I need a room editor:
In fact, let’s skip right down to having made an editor for this:
Now I can just select the type of tile I want and click/drag the map to update it. Instant preview. This is one of those editor tools that should save massive amounts of time versus trying to use dropdowns and such. (Plus, in the future I will need additional information, like loot, enemy spawn points, etc.)
My tiles are also just prefabs that know how to take a tile definition and apply its properties, currently the sprite it uses:
This means the tiles in the world are actually the ones I want them to be under the current “tileset”.
Each room is an asset. And a bunch of similar rooms form a collection of rooms. These collections can be referenced by a level (asset). So, for example, I could have a bunch of variations of generic library room and the current level might be a library. This saves some redundancy of trying to drag&drop dozens of assets that are shared between levels.
In short, all this results in the dungeon generator picking the right rooms for its (yet to be actually coded) generation:
The above is a start room, a few regular room and a goal room.
The above is lots of framework and details to set it all up for later content creation. It also happens to be very screenshotable, so this post is already long by itself and it only talks about the basics of tiles. There are so many features and mechanics that I will still need on top of this. Not to mention an actual dungeon generator. I’ve worked in parallel on player movement, but I will cover that separately. You can see dummy red mobs on the tiles and the green player.