Block Size in Roguelikes

David Stark / Zarkonnen
28 Jun 2020, 8:12 p.m.

How big is a tile in a roguelike or similar game? What shape does it have?

I've been playing (and modding) a lot of Caves of Qud, so this is something I'm thinking about again. I'd love to see or make a roguelike where the levels are truly three-dimensional rather than 2D levels connected by staircases. Qud has some nods to three-dimensionality. Brogue has some more. Dwarf Fortress is 3D except that dwarves still don't understand about things like, for example, rooms that are taller than one floor.

So let's define the size and shape of these tiles.

In a standard roguelike, a tile is big enough for a person to stand on - or even a bear, or a dragon. We can say it's one square metre. And it's at least two square metres tall. But tiles also have floors, so even if there are two empty tiles atop one another vertically, they're not automatically connected. Which means that in a standard roguelike, 3D space is subdivided into alternate layers of maybe 1x1x2m blocks and floors of an uncertain thickness.

Dwarf Fortress makes this more explicit, because there, you can mine through floors as well using the "channel" command, connecting up two vertically adjacent empty tiles.

So in Dwarf Fortress, the grid really is alternating vertically between let's say 1x1x2m and 1x1x0.5m blocks.

In Minecraft, on the other hand, the blocks are all exactly 1x1x1m, except that this turns out to make for really thick floors, and so they've hacked in all kinds of half-block shapes.

The reverse problem also exists: what about entities that need to be bigger than the block size? Minecraft has this problem with doors, which need to be 1x1x2m so players can actually pass through. So again, this had to be hacked in, with doors being blocks that actually span two blocks.

Looking at floors, it would be better if Minecraft had 0.5x0.5x0.5m blocks, and looking at doors, 1x1x2m ones would be more suitable. Roguelikes generally go for the second of these options, insisting that all entities fit into one tile - even if they're a dragon.

This is kind of a mess, especially if you want to make a more 3D dungeon environment. If your blocks are all 1x1x2m, your stairs and slopes are impossibly steep. It's OK for artificial environments, but for natural environments, where you have such things as gentle slopes, it's pretty unpleasant. But if your blocks are all 1x1x1m or smaller, doors and characters (and dragons) have to span across multiple blocks.

Thinking about it, it may be best to pick a quantisation that's just small enough that there don't have to be any additional ad-hoc subdivisions like Minecraft's half-blocks, and that's small enough to allow for objects like walls to be reasonably thin. That way, you only have to deal with one problem - entities spanning multiple blocks.

Perversely, that quantisation is the cubic foot. One foot (30.48cm) is still a bit thick for walls, but not too thick. A person can squeeze through a one-foot gap or stand in a 2x2x6ft volume.

This does mean having some robust support for entities spanning multiple blocks, but having it be a common case may actually mean it does get more robust. And it's probably enough to have entities that span cuboid shapes.

Now to find the time to try this out...