Developing Multitile Creatures in Roguelikes

May 19, 2020
protect

Creatures/entities that occupy more than one space in the grid-based world of a roguelike still aren't all that common, although in the development community this is an increasingly popular topic. Many of these discussions revolve around how to solve various technical and design issues associated with this type of entity, and while I've provided input in a number of these conversations over the years, it's really about time to collect some of these experiences, observations and advice into a single article for better reference :)

I gave "multi-tile robots" cursory coverage back when I was first spinning up Cogmind as a commercial project in 2013, but all I really did there was give a basic description rather than look into the nuts and bolts underpinning this feature.

I've been working with multitile creatures since 2011 when I first added them to X@COM. As I wrote about there, it was quite a headache because I didn't include them from the very beginning, but it was both necessary to do considering the primary source material (X-Com) and also definitely adds a lot of character to these creatures, so very much worthwhile.

The famous example of a big 'D' dragon occupying only one space, the same tactical unit as a tiny adventurer, is great in its own way (elegant!), but there's something to be said for the psychological impact and mechanical implications of an actually physically larger creature.

An adventurer faces off against... count them... five dragons in this room :P

I guess there's also the realism argument--although complete realism isn't usually a good goal in games, it's always nice when you can both embrace it and get some benefits in return.

"Holy... look at that thing! We probably can't take it on at this point, but if we escape down this narrow corridor it probably won't be able to follow us... We'll find another way around."

Types and Examples

Technically the concept of "multitile" creatures can be subdivided into a number of different categories, not all of which I'll be covering in detail here.

For example a number of roguelikes have stationary multitile creatures, like Ivy Creepers in Ragnarok.

Ivy Creeper wiki data from Ragnarok. (It'd be nice to get a shot of them in action, but they're rare in that game, and unlike with other games the internet lacks a good variety of screenshots of this very old roguelike!)

Although stationary, sometimes creatures in this category can also grow outward, like the various Ivies in HyperRogue.

Hacking away at Mutant Ivies in HyperRogue.

Overall these are fairly easy for developers to work with, it's just a case of whether you want/need something like this in game.

There are also snake-styled multitile creatures which can move, but where the body essentially follows whatever path the head has taken, so also not all that hard to manage.

A Long Worm in NetHack, where only the head ('w') can attack, but attacking it in the body ('~') may cause it to divide into two worms.

HyperRogue also has several snake-like multitile creatures, including Sandworms.

The genre also includes amorphous area-based creatures like DCSS Krakens, which consist of a single body tile and send out tentacles which essentially behave as individual creatures (although their range from the body is restricted, and damaging them also damages the Kraken).

Encountering Krakens in DCSS.

For the purposes of this article, to keep the scope in check (and more importantly to cover the especially challenging areas where questions usually arise) I'm really only interested in the most generic type of multitile creatures, those where the entire creature is a "connected solid blob" that is present on the map and moves as a unit like other single-tile creatures.

Probably the most extreme example of this category would be Dumuzid, a 7DRL explicitly designed around the concept of size, so it's not surprising that you can end up with a massive sprawling body that moves as one.

Defeating enemies to expand your own body in Dumuzid, often eventually finding it difficult to fit through various areas, or the right angle to attack an enemy. This is just the start--your body can get quite expansive, and you might need to intentionally shave it down sometimes as well. It's even possible to lose by getting stuck!

Some more typical examples, all coincidentally reflecting the theme that multitile creatures are often used for especially challenging or awe-inspiring enemies like bosses:

Fighting Baezl'bub in POWDER.

 

Fighting Xiatol in Cardinal Quest 2.

 

Lost Flame has quite a few types of multitile enemies (and not just bosses, either!) which meld well with the game's heavy focus on telegraphed attacks and tactical positioning.

For X@COM I went all in on the multitile units, branching out from the original requirements for X-Com. It's fun to drive a tank through walls and watch the building collapse :). It's also fun--but scarier--to watch huge enemies rampage through buildings, knocking down walls and crushing furniture! X-Com itself only had units up to 2x2, but when putting in place mechanics like this, may as well make the size arbitrary! Back then while recording a video demonstrating sound testing there was a 5x5 Colossus at the end, which you can see below starting from 3:50:

<iframe title="Embedded content" src="//www.youtube.com/embed/IZd7nDW1qYw?start=230&amp;enablejsapi=1&amp;origin=https%3A%2F%2Fwww.gamedeveloper.com" height="315px" width="100%" data-testid="iframe" loading="lazy" scrolling="auto" class="optanon-category-C0004 ot-vscat-C0004 " data-gtm-yt-inspected-91172384_163="true" id="371702911" data-gtm-yt-inspected-91172384_165="true" data-gtm-yt-inspected-113="true"></iframe>

Having inherited its architecture and even some mechanics from X@COM, Cogmind also includes a number of multitile entities for their shock and awe factor. Although there are slightly more obstacles to overcome when moving from a more open surface environment vs. the subterranean environments more typical among roguelikes, for me it's worth the trouble.

A Cogmind Behemoth in the wild. (Uh oh, all hell is about to break loose and those machines are explosive...)

IVAN reportedly also has 2x2 monsters that can usually destroy walls in order to move around (or are simply stationary), but I couldn't find any good resources or images on those.

I'll be sharing more examples from Cogmind and other roguelikes below where applicable to the topics we'll be covering.

Note that as discussed here multitile creatures refer to those of an actual larger size when it comes to mechanics and the number of grid spaces they occupy, not just cosmetic size, which a number of games do as a simple way around implementation issues, but as a result also don't fully realize their potential.

Appearance

There are a number of different ways to depict multitile creatures on the map, some of which might need to get creative if limited to ASCII and/or traditional grids with an otherwise uniform cell size.

For Cogmind's ASCII mode I chose to repeat the single character across the area currently occupied by the entity. The usual opposition to this concept claims that it becomes impossible to distinguish whether it is a group of entities or a single large entity, but in practice that's not really much of an issue since based on the game content it's otherwise extremely rare to have individuals matching that letter both adjacent to each other in a uniform shape and also moving in perfect formation. Not to mention when examining such an entity all the spaces are highlighted together, and labeling (or for example in other roguelikes listing what is currently visible) only does so once for the entire thing, rather than for every constituent cell. So this isn't really something to worry about unless there is something else specific to the given game's content or mechanics that might lead to confusion.

Highlighting and labeling a large robot in Cogmind's ASCII mode.

A fire-breathing dragon from an early build of Ultima Ratio Regum.

Incursion offers another potential approach for ASCII-based roguelikes, linking the creature's character to its surrounding occupied cells with a separate representative character, in this case using '+':

A Huge Viper in Incursion--the 'R' surrounded by '+'.

Under a very strict grid-based system like that often used in ASCII games, it's technically still possible to draw multitile creatures using a sprite that extends over more than one cell. Cogmind's engine in particular doesn't even support drawing anything that doesn't match the grid size, so the only way to draw a multitile object is to do it piecemeal, one cell at a time. For example, the 2x2 Behemoth consists of four separate cells, appearing as such in the sprite sheet:

Cogmind sprite sheet excerpt--Behemoth cells. The first is the top-left, followed by top-right, bottom-left, and bottom-right. The same system is extrapolated for even larger entities.

Many roguelikes using modern engines don't necessarily care about this sort of thing, and are instead able to simply draw any sprite, large or small, at any position. Zorbus offers a good example of multiple different methods for drawing large creatures when there aren't any architectural restrictions.

Various dragon representations in Zorbus. While most of these are purely stylistic differences, important to note is the ASCII version demonstrating yet another approach: Just make the letter bigger :P

Partial Visibility

JikGuard.com, a high-tech security service provider focusing on game protection and anti-cheat, is committed to helping game companies solve the problem of cheats and hacks, and providing deeply integrated encryption protection solutions for games.

Read More>>