Official development blog
[ Latest Cogmind Release Notes: Feb 2026, "Unchained More" ]

My Cogmind Dev Tools

I sometimes get questions about what I use to develop Cogmind and although I compiled a list on r/RoguelikeDev years back, it’s undergone a few changes since then, so it’s about time to put an updated version here on the blog for anyone who’s interested. Maybe you’ll find something useful you weren’t aware of before :)

Text Editing

Notepad++

No doubt the star of the show, Notepad++ is such a fast and versatile editor. I love how responsive it is. I’m actually still using a custom version built in 2012, from back before NP++ included support for extensive user-defined syntax highlighting. These features were eventually added to NP++ itself (I think contributed by the devs who developed the version I’m using now, actually), though I’m happy with what I’ve got now so I just keep using it.

I use Notepad++ for editing game data and scripts, for which I created custom syntax rules and set a ton of Cogmind-related keywords to make the job of content creation easier.

cogmind_data_npp_editing

Editing Cogmind data files in Notepad++, with custom syntax highlighting and keywords (open for full size).

Every day I pretty much always have Notepad++ open with Cogmind’s most commonly edited data files already loaded, mirroring most to top and bottom panes so I can take advantage of horizontal scrolling and keep column headers visible, or of course simply be able to edit two separate locations in the same file (or reference one position while editing another)

I also frequently use the macro system to facilitate editing (which is again so much faster and more responsive than those I’ve found in other programs), and will sometimes even drop text from other programs into NP++ to record and run a macro on it before copying back the results :P

Simultaneous multi-line editing is also great, especially for my needs given the typical layout of Cogmind’s data files.

cogmind_data_npp_multiline_editing

Random example of using multiline editing in Notepad++.

Yay for Notepad++!

TED Notepad

I found this gem while looking for a Windows Notepad alternative, and it really delivers. I write all my notes (e.g. todo lists, game design docs) in simple .txt files, and TED Notepad is a great lightweight editor with a wide variety of text processing features that can come in handy sometimes, too.

TED_notepad_tools_lines_options

Some of TED Notepad’s text processing options.

As much as I like Notepad++, I don’t want to use it for this since I prefer having an editor with somewhat different settings and behaviors more suitable for my typical note-taking needs. I use a different font and colors for editing notes, and it’s nice to have separate small windows for each file I’m working with, windows that I can also close with a simple press of Escape.

cogmind_notes_alpha_terminal_hacking_overhaul

Sample notes from Cogmind’s terminal hacking overhaul in early alpha (open for full size). I’ve shared a fair number of screenshots of my notes on the blog before, so this style will be familiar to regular readers :)

Programming

Visual Studio

Cogmind is written in C++ and my primary IDE is Visual Studio, which needs no introduction.

I started using VS back in 2006 after migrating over from Bloodshed Dev-C++ at the suggestion of my brother. (Ancient history: Years before that I just wrote C code in Windows Notepad and used a command line compiler… What a long road it’s been :P)

Cogmind was first developed in Visual Studio 2010, and although there have been five new major versions since then, I’m still using 2010 since it works fine and I’ve got it all set up the way I like it (I have a number of extensions), so don’t see a need to switch versions.

cogmind_source_sample_player2_ui

Sample source code from the UI in Cogmind’s most recent special event/mode, in VS2010 using my color scheme. Like the notes shots, you’re probably familiar with seeing these from time to time on the blog :P

Overall I really like the Visual Studio debugger and have become familiar with many of its other features over the years. Some of my favorite/most-used hotkeys:

  • Shift-Alt-Arrows: Expand cursor across multiple rows for multiline editing, or to select an arbitrary block of text for copy-paste; like in Notepad++, editing multiple rows at once is a great feature that comes in handy when coding certain things
  • Shift-Alt-s: Split the current file in two views, to access two different places at once
  • Ctrl-Shift-Up/Down: Move cursor between top/bottom file views
  • Ctrl-Tab: Switch back and forth between the most recent two edited open files (or press faster to go back further in the editing chain)
  • Ctrl-]: Move cursor to matching parenthesis/bracket
  • Ctrl-k, Ctrl-k: Set/clear a bookmark at the current line
  • Ctrl-k, Ctrl-n: Move cursor to the next bookmarked line
  • Ctrl--: Move cursor to its previous significant location (and Shift-Ctrl-- to move forward again if somewhere back in the cursor history)
  • There’s also the more obvious/common Ctrl-Shift-B to build, F5 to build/run, Shift-F5 to stop debugging, and F9 to set or clear a breakpoint.
  • I think I changed one of these from its default binding, but at least this list lets you know it’s a feature!

I don’t use the mouse much while coding, if I can help it :P

Very Sleepy

Very Sleepy is a great and free CPU profiler for Windows which has helped me improve Cogmind a good number of times whenever something starts to slow it down and I need to find just what it is, or look for general areas that can be improved.

I’ve shared info about this on the blog before, most recently in my article on Turn Time Systems last year, and probably most importantly in this progress update where I talked about multithreading Cogmind’s most time-consuming asset loading routines to cut the game startup time by one-third. I’ve also used it to help optimize pathfinding on multiple occasions. Roguelikes tend to do a lot of pathfinding!

cogmind_profiling_optimization_targets

Identifying high-level optimization targets in Cogmind’s startup process using data from Very Sleepy profiling.

Very Sleepy is super easy to use: Just point it at a running .exe and start. Collect data. Win. Amazing stuff.

Trivia: REXPaint‘s default GUI skin theme is named “Sleepy,” after Very Sleepy, since around the time I released the first public version in 2013 I wanted to use something other than the default theme I’d originally built for it when working on X@COM, and had just discovered Very Sleepy at the time and its website used a similar blue-ish color scheme that I liked (which is apparently now different these days!).

Design

yEd

During pre-alpha development I wanted a convenient way to design Cogmind’s world map via computer. Sketching on paper is fine for one-off tasks, but of course in this case I knew I’d be updating it in the future and wanted to be able to dynamically add areas, group them, show relationships… so flowcharting software seemed like a natural fit.

cogmind_world_map_with_distorted_branches_and_some_missing

Cogmind’s world map as seen in my yEd graph, albeit with branches distorted (and some locations completely removed for the screenshot :P) to avoid leaking spoilers. It started out simpler and has been expanding for years as I continue to add new maps.

In my search I found yEd Graph Editor, a free solution which also happens to be quite powerful. I only use a tiny fraction of its capabilities, but at the low end it’s really user-friendly, quick to get started with, and easily produces nice-looking graphs.

Aside from the original purpose, to create the world layout, I’ve since used it for a number of others things like making flowcharts for demonstrations. For example this one from my article on level design:

cogmind_level_design_exiles_strategy_flow_considerations

The yEd graph created to demonstrate the primary long-term strategic decisions related to the Exiles, a new world map location added last year.

I’ve also sometimes used it for figuring out program architecture if there are a lot of moving parts.

In going back through my yEd files for this post looking for examples of others kinds of things I’ve used it for over the years, I found this visual breakdown of Cogmind’s early development timeline, including game content relationships:

cogmind_visual_development_roadmap

Haha, wow time does fly… This graph accompanied my announcement regarding Cogmind’s upcoming “alpha release state” in 2015, written a couple months before the first release.

Anyway, if you need software for something like this, I highly recommend yEd.

Excel

Spreadsheets are extremely important when designing a large game, helping organize lots of raw data and balance mechanics. I didn’t originally want to use Microsoft Excel, since MS Word is a pretty terrible word processor and Excel must be of similar quality, right? Wrong.

For the first year I was using OpenOffice Calc for spreadsheets, but during that time it felt like the software was fighting against me anytime I wanted to do something, and there were weird design decisions all over the place. So when at one point for some reason at the time I had to use Excel, I discovered just how easy it was to do so many things I wanted to do, even without any experience! Things Just Worked. So I switched my design spreadsheets over (which was kinda painful since some things didn’t translate well, but I didn’t need all of the files by then, so I just converted and fixed the important ones).

I’m actually still using an old 2007 version of Excel I had, too, but it’s fine :)

cogmind_design_spreadsheets_collage_small

Various design-related Cogmind spreadsheets (open for full size).

I also use spreadsheets for analyzing Cogmind scoresheet data, the results of which are put on the forums, and I’ve done some even more in-depth statistical articles on the blog before, like Player Metrics: Stats and Preferences on and off Steam.

cogmind_analyze_scores_output_userscores_best_sample

Player scoresheet data as output to a .csv file for analysis in Excel.

Ever since starting this commercial project I’ve also been using a massive Excel spreadsheet to record my daily work progress.

cogmind_dev_hours_cateagorization_excerpt_oct_2019

Recording and categorizing hours of work each day, and noting where that time was spent. It’s also then easy to produce and maintain a variety of graphs based on this data. This data set, now north of 2,500 rows, is what I’ve been using to share occasional progress graphs over the years, like I do in some of my annual reviews, for example.

Spreadsheets are of course also useful for storing and analyzing financial data and any other database-like info that you need when running a business.

Excel makes it quite easy to do all this, and of course it’s a huge piece of software with a lot of features and there’s a large variety of things you might want to do and aren’t sure how, but at least it’s easy to find answers online since it’s so widely used.

Art

REXPaint

My most commonly used art-related tool is REXPaint, the ASCII/ANSI editor I first released publicly shortly before starting Cogmind development proper, and have updated many times since (with no doubt more versions to come!). It’s incredibly valuable for UI mockups and mapping, and of course makes it possible to more easily produce Cogmind’s iconic item and achievement art.

cogmind_thermal_cannon_spritesheet_excerpt_rexpaint_GUI

Part of one of Cogmind’s many item art “spritesheets,” as it appears in REXPaint.

 

cogmind_rexpaint_design_files_collage_small

A sample of the variety of my internal design work done in REXPaint (most of it for Cogmind) (open for full size).

Lots of devs and artists use REXPaint--you can see some samples of their work in the gallery.

I’ve also written some relevant guides a while back, including Roguelike Development with REXPaint and Cogmind ASCII Art, the Making of.

Photoshop

For anything that doesn’t fall under the grid-based umbrella that REXPaint is built to work with, I use a lot of Photoshop. That includes screenshot work, logos, and other raster images for marketing purposes. Also of course a lot of the diagrams and other images shared on this blog :)

cogmind_beta_9_wizardry_logo

The release logo for Cogmind Beta 9 “Wizardry,” created in Photoshop.

It’s an amazingly powerful tool, one that I started using over 20 years ago since that’s what my parents have always used :P. I’ve tested out a lot of other programs over the years, but always come back to Photoshop.

Although it’s probably not the best tool for the job, I’m most familiar with it so I even use it for pixelwise work including tilesets and bitmap fonts, as explained in my font series.

cogmind_9x18_font_layers

Examining bitmap font layers in Photoshop.

Because traditional roguelike screenshots are almost always best created as pixel-perfect PNGs, good PNG support is clearly an important thing to have in your software of choice. For that I use SuperPNG, a Photoshop plugin with more control over PNG output and better results than what you’d get with Photoshop’s native plugin.

Sound

Audacity

Ever since my first game that actually had sound effects, I’ve been using Audacity to manipulate and otherwise work with them. It’s a pretty powerful package for the low price of free. Getting just the right sounds often involves mixing, adjustments, conversion etc., and Audacity handles whatever I throw at it, so I’m satisfied :)

cogmind_sfx_explosions

Mixing samples in Audacity to create a final explosion sound effect.

You can read more about my use of Audacity in Sound Design in Cogmind, a How-to.

Reaper

Reaper is a powerful digital audio workstation, for people who really know what they’re doing. I am not one of said people, but I did really need something that could handle high-quality bulk conversion of audio assets, something Audicity couldn’t really do very well at all (maybe it’s gotten better in more recent versions? I dunno), and this was the best thing I could find for the job.

Winamp

Shout out to this vital tool! Okay so Winamp is technically a music player, one that I’ve been using for a couple decades and still use every day, but 1) listening to music while developing is really what keeps me going and focused, and 2) I do also use it for quick local browsing of large numbers of sound samples when doing audio work.

Winamp development died out years ago, then surprisingly a couple years ago a new version appeared and there is presumably more work going into a successor, but anyway, I’m using that new version, which has improved support for Windows 10.

Media

LICEcap & gifsicle

A side effect of Cogmind’s design focus on avoiding unnecessary visual distractions means that most static screenshots tend to look pretty boring, at least compared to what the game can look like in motion.

cogmind_part_sorting_animated_final

Characters look even cooler when they’re moving around, eh? :P

A quick survey of all the Cogmind media I’ve shared on Twitter over the past seven years shows that 35% of it was GIFs (the remaining two-thirds being PNGs).

cogmind_robot_hacking_gif_collage_small

A composite GIF produced to go along with Cogmind’s Beta 7 release, focused on robot hacking. There are 65 hacks in all.

In my search for an easy way to record GIFs I found LICEcap, an incredibly simple but effective program for recording directly from your desktop. I tried many others, but most either didn’t work for me, or at least not very well. LICEcap consistently produces very nice results, and that’s what I’ve used for all my Cogmind GIFs.

For even better results, I also run the LICEcap output through gifsicle, which optimizes GIFs into much smaller files that appear identical to the original--you can save a lot of space (and therefore loading time) with traditional roguelikes due to their typical minimalist visual style. For example GIFs can be optimized by removing data for pixels that don’t change between frames, and seeing as a large portion of roguelike interfaces and map views are static at any given time, even long GIFs can end up with a surprisingly low disk size.

gifsicle is a command line program, so if you want to try this approach without reading through the manual:

  1. Download gifsicle
  2. Download my GIF downsizing script and rename the .txt extension to .bat
  3. Put both gifsicle.exe and gifsicle-shrinkall.bat in the same directory along with any GIFs you want to shrink, and run the .bat file
  4. Enjoy your smaller GIFs :D

The batch file just contains the line “for %%f in (*.gif) do gifsicle --batch -O3 -k256 %%~nf.gif”, which instructs gifsicle.exe to shrink all the .gif files it finds in the same directory.

gifsicle can help you with lots of other GIF-related modifications, though this is the only one I run for literally every recorded animation.

OBS Studio

As something interesting to try I began occasionally streaming Cogmind weekly seed play, the first ever apparently taking place in November 2015, though I didn’t actually start saving them until December 2017, so the first couple awkward years of my streams are no longer accessible (maybe that’s a good thing :P).

It was a sudden decision to begin doing that, after seeing other devs doing the same and players expressing interest, and at the time OBS seemed to be the most popular way to stream, so I used that.

Streaming gradually became something I do alongside development, mainly of various Cogmind runs, as a way to both interact with the community and keep tabs on the player side of the experience. Certainly a much broader range of feedback comes from players, including indirectly just from watching what players share and talk about, though that’s no substitute for playing it myself to get the full moment-to-moment experience and possibly lead to fixes, tweaks, or new ideas.

Later on OBS gave way to the newer OBS Studio, so I switched to that. It might take a little while to get everything set up nicely, but once everything’s up and running there’s no real need to mess with it. Overall a decent piece of software.

(Trailer Production)

One thing I found OBS unsuitable for in my case was recording game footage for the trailer, but there were plenty of alternatives to try out there.

I won’t go over the details of the tools I used to make the trailer, since in all these years it was a one-off thing (so far) and I already have a dedicated article explaining that entire process. You can check that out for more info, but in short I used Camtasia, Movavi, and After Effects.

Web

Visual Studio Code

Similar to how I use two separate text editors, I like having a separate editor for all my web dev work so that the environment (e.g. fonts/theme/hotkeys/other options) can be set up differently, plus using different softare helps me get into a different mentality, and my web dev stuff is also pretty simple anyway, so no need for something like Visual Studio with all its bells and whistles.

I’ve gone through several different editors over the years, and have currently settled on Visual Studio Code.

cogmind_website_faq_source_sample_visual_studio_code

Visual Studio Code showing an excerpt of Cogmind’s website FAQ source.

I haven’t used VS Code a whole lot since I only switched to it within the past year and have been doing less web dev in that time, but it seems pretty nice, and it’s amazing to see MS build something that even many Linux developers have fallen in love with! (it’s cross-platform)

I use it mainly for editing HTML and CSS files.

FileZilla

If you’ve got a website and regularly deal with lots of files, you’re almost certainly going to want an FTP client to expedite the process. Duh. For this I use FileZilla, a pretty popular solution that gets the job done for me.

Backup

FBackup

Backups are vital. It’s sad how many times over the years we hear stories about devs (including in the roguelike community…) who’ve lost their entire project simply because a drive died and they only had one copy. Sometimes it’s months or even years of work!

I have an external hard drive for on-site backups, and use FBackup to mirror all my personal data (including of course Cogmind). It’s fairly easy to set up and use, and I used to run it all the time, but now I admit I don’t do it as often since I pay for an even better solution:

Crashplan

For a while I was trying to store backups of my data on a remove server of my own, but it was just too cumbersome and error-prone, so I went searching for a better solution.

Crashplan is one of the best, a service I use to maintain incremental backups of most of my data, pretty much in real time. I feel a lot safer having everything stored off site.

I haven’t ever needed Crashplan to recover Cogmind data before, but it’s helped me out a few other times and the recovery is quick and easy. Theoretically I guess I could also use it roll the Cogmind source back to any arbitrary point, too, though I doubt I’d ever need it to do that :P

By now you might notice there’s a major component missing from this (and/or the Programming) section of my list: version/source control. So technically I do have a GitHub account and that’s where Cogmind’s scoresheet definition lives so that that the new online scoresheet system (not built by me) can reference it, as can others looking to access the data (although I hear that will be available via an API in the future).

But other than that, I don’t use third-party source control solutions. Yes I do keep organized backups of Cogmind’s internal versions, but mainly just for the relatively rare need to reference them, and I don’t use any special software to manage this process.

Miscellaneous

There’s one other tool I like that doesn’t really fit well elsewhere, but can be quite useful: Bulk Rename Utility. If you ever have to rename a large number of files in a smart manner, BRU is for you.

Also the UI is great ;)

bulk_rename_utility_main_interface

Behold, Bulk Rename Utility with all its glorious fields, buttons, and drop-down menus!

It can honestly take a bit to get used to the UI, but it is very very powerful. It helps that you can see a realtime preview of all the changes you’re going to make once you execute, so you don’t have to apply any actual file renaming until you’re sure you’ll get the results you want.

Abandoned Tools

Aside from some examples mentioned above (OpenOffice Calc…), there’s other software that I was using at one point during Cogmind development but later abandoned. Might as well give them some cursory coverage here, too, for the record.

SilverNote

Cogmind’s original alpha design doc was written entirely in SilverNote. At the beginning of the project I was looking for a solution with strong support for list-based note taking, since that’s almost always how I write my notes (lists with sublists with sublists and so on), and SilverNote seemed to fit the bill.

It turns out SilverNote is a pretty bad piece of software, and the dev didn’t seem interested in fixing its bugs and other issues (the original website doesn’t even exist anymore, and it’s now apparently freeware).

By the time I’d made that determination I already had a bunch of notes stored in its proprietary format, so I decided to just power through and continue using it up to the alpha launch, since it was just the main design doc anyway.

Most of the content and features described therein was already implemented as of Alpha 1, so not long after the launch I just had SilverNote use its “export to HTML” feature to convert the old notes to a more accessible format in case I needed to reference them later, and stopped using SilverNote entirely.

Instead I began happily using .txt files again :P

cogmind_alpha_design_doc_summary_excerpt

An excerpt from Cogmind’s original alpha design doc. Each ‘+’ hides subsections, many of which have lists many levels deep where necessary. (SilverNote only crashed about ten times while I was trying to open the notes and get them prepared for this screenshot xD)

You can see a full summary of the above doc here, with more examples of what it contains, although when fully expanded the doc is 56 pages long (plus contains things I wouldn’t want to get questions about and have to explain :P), so this summary, too, is mostly top-level notes. Still, you can see some of the categories and contents if interested.

Note that Cogmind’s alpha design doc is missing more fundamental things you generally find in a design doc, because remember Cogmind Alpha was basically the second go at this, building on what was already done for the 7DRL the year before starting this as a commercial project. The 7DRL itself already had its own design doc covering a lot of the basics, and those features were already complete and carried over to the commercial version (I didn’t even rewrite the 7DRL code, just used it directly).

Sublime Text

Sublime Text was the hot new text editor when I happened to be looking for something to do my web dev with, so used it for a while and it was just okay. Then they switched to a pay model (it was originally free) and I didn’t really like it that much, so I went to look for something else.

I mean there are a lot of text editors out there and I’ve only used a handful of them :)

Atom

I replaced Sublime Text with Atom, another editor growing in popularity.

Oh my god this program. is. so. slow.

I compare everything to Notepad++, so maybe I’m biased because NP++ is insanely responsive almost regardless of what I throw at it, but Atom just felt like coding through molasses.

Nonetheless, I actually continued using it for a couple years or so because after finally getting it configured I was too busy with real work to go searching for yet another program, and I try to do as little web dev as possible anyway so it was only so painful :P

(Note: Maybe it’s gotten faster now, I dunno, but it was definitely anything but fast before.)

Conclusion

There you have it--my Cogmind dev tools!

I think I’ve covered everything here, but if I missed/overlooked a category or some aspect you’re interested in, feel free to ask.

And a final question: If anyone’s interested in an overview of the history and structure of the engine powering Cogmind (Rogue Engine X, first built in 2011), let me know and I could do that as the next post. Seems like a natural followup to something like this.

Posted in Gamedev | Tagged , | 4 Responses

Developing Multitile Creatures in Roguelikes

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.

nethack_dragons

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.

ragnarok_ivy_creeper_wiki_data

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.

hyperrogue_mutant_ivies

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.

nethack_long_worm

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_sandworms

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).

dcss_krakens

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.

dumuzid_7drl

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:

 

 

lost_flame_multitile_boss

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 2×2, 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 5×5 Colossus at the end, which you can see below starting from 3:50:

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.

cogmind_behemoth

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

IVAN reportedly also has 2×2 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.

cogmind_behmoth_ASCII_with_label

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

 

URR_fire_breathing_dragon

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 ‘+’:

incursion_huge_viper

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 2×2 Behemoth consists of four separate cells, appearing as such in the sprite sheet:

cogmind_tileset_excerpt_behemoth

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.

zorbus_multitile

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

A number of roguelikes (including Zorbus above) might display multitile creatures simply using large characters, highlighting another consideration when working with multitile creatures: partial visibility. Field of view in roguelikes is almost always handled on a cellwise basis, so what does the player see if only one or more pieces of a multitile creature are visible?

In terms of ASCII and Cogmind’s default approach of repeating the same character throughout every occupied cell, seeing only part of a creature doesn’t make much of a difference since every cell contains the same representation. Perhaps the main concern here would be that a player might not be able to immediately distinguish whether a single ‘B’, for example, is a corner piece of a large Behemoth or a single-tile Brawler-class robot. This is where it helps to have those automated labels demonstrated earlier--the question is answered immediately on spotting them!

cogmind_multitile_robot_ASCII_partial_visibility

A partially visible Behemoth has its top-left corner labeled on sight.

To demonstrate another scenario, we can use a graphical Cogmind mod recently released by Ape, which converts the default multicharacter style to instead use large characters like so:

cogmind_multitile_robot_ASCII_large_character_mod_by_ape3000

A large-character multitile Behemoth as it appears in Ape’s graphical Cogmind mod. So imposing! I love it. (This particular ASCII mod also uses the tileset specifically for walls.)

So what happens when this only the corner of this particular Behemoth is visible?

cogmind_multitile_robot_ASCII_partial_visibility_large_character_mod_by_ape3000

A partially visible Behemoth assuming large characters are used for multitile entities.

Again the autolabeling will help here anyway, but the top-left corner of a large ‘B’ character actually looks like an off-center ‘c’! And of course each other corner, or side, will have its own unique appearance. Partial visibility doesn’t work so well with this approach as far as quick visual parsing goes (usually one of the advantages of using ASCII in the first place).

Based on this info, with multitile creatures we might want to break the mold of displaying only the cells that a player can currently see, and instead allow the player to know and see the full extent of any multitile creature they can at least see part of. This could apply to both ASCII and tilesets. Either show the entire creature normally if any of its parts are visible, or show it all but consider fading those cells not currently in FOV, since it can still be important to know when certain subsections are technically out of view.

cogmind_multitile_robot_ASCII_partial_visibility_large_character_mod_extended_visibility_options

Examples of what it would be like to show the full large-character Behemoth even though only its corner is visible (A), or perhaps fade those sections which aren’t themselves in view at the moment (B).

For cogmind in particular I decided against showing parts outside FOV (which is an option even if separate characters are used for each part!) because it would complicate a lot of the UI features in my case. I imagine it would work fine for a lot of other roguelikes, though.

Architecture

Handling relative position data for entities is fairly straightforward when each one can only occupy one cell at a time, but what do you do for those with a larger footprint? Some people get hung up on this question. The answer for a given roguelike could depend on other needs and architectural concerns, but here I’ll share what’s worked well for me.

This is rooted in the format for general map data, so here’s a diagram of how Cogmind map objects are structured:

cogmind_world_architecture_diagram

Diagramming the relationship between common object types on a Cogmind map.

This diagram includes some superfluous info because I pulled it from a broader discussion, but the concept to pay attention to here is that 1) an entire map/floor is represented by a two-dimensional matrix of Cell objects, and 2) within each of those cells is an Entity object. “Entity” refers to an actor/creature/character/mob/whateveryoucallit, where the Cell stores its occupant’s handle (sorta like a pointer) or simply null if no Entity is currently present at that location.

Although I do also have a list of all the Entities in existence (technically managed as a separate list for each faction), and that format clearly comes in handy for some types of operations that need to iterate over all Entities, I find it very useful to have an actual 2D space across which to perform spacial searches and apply effects etc. For performance reasons this is especially important in Cogmind where there are hundreds of Entities at once.

So what does this mean for multitile Entities? Well… just put their unique handle in every Cell they occupy :)

It’s not like the Entity object itself is actually copied anywhere--it’s just a little handle, so there’s no serious waste of space, but definitely a serious bonus to convenience. Processes checking who’s occupying any one (or more) of those Cells will be pointed to the same Entity. Whenever the Entity changes position, it just moves its handles from all of the original space(s) it occupied to the new ones.

Each Entity itself also stores a list of all the map coordinates it currently occupies. While it’s true that for most/single-celled Entities this list only contains one coordinate, implementing the system like this makes it easily scalable. At the same time, although for most roguelikes you could generally extrapolate these additional coordinates if you know their reference position and size, that’s pretty slow to be doing all the time!

In my case I chose the Entity’s top-left corner as their “reference position,” the first to appear in its list, where any additional coordinates are added in row-first order (notice how the indices here will conveniently mirror offsets in the sprite sheet shown earlier ;)). The idea of a reference position will come in handy later.

(Although most devs there don’t make mention of multitile entities, regarding map object architecture you might find other inspiration in the previous relevant FAQs over on r/RoguelikeDev.)

Shape

Before we go any further it’s important to talk about shape as it relates to multitile creatures.

By far the most common multitile creature in a roguelike, if there are any at all, is the so-called “2×2”, occupying a total of four cells. As a square this is fairly easy to deal with because it doesn’t have any convex or concave elements to complicate movement or interactions.

Non-square shapes (even just rectangles!) are problematic since then you likely have to deal with the logic and consequences of rotation, among other issues. With multitile creatures already introducing enough of their own complications, most roguelikes don’t venture into other shapes. (Something like Dumuzid is of course an exception here, since its a small game where the central theme happens to be size manipulation. Interestingly, it does not allow rotation, either.) Rotation suggests an explicit facing, anyway, and most roguelikes don’t have facing mechanics, so multitile creatures that imply multiple orientations are often avoided.

Pathfinding

Whenever the topic of multitile creatures pops up in the roguelikedev community, there’s a good chance it’s someone asking about pathfinding. In a game where every actor occupies exactly one space, moving them across a grid seems a lot more straightforward than managing those which need extra space to move around.

For the purposes of pathfinding for multitile creatures we’re going to be ignoring these less common scenarios and, again, creatures outside this article’s scope:

  • non-square shapes (and by extension any rotation involved with those--CDDA has rotating multitile vehicles of various shapes if you want to look into that, for example here)
  • snakes (longer are especially challenging, since they can block themselves!)
  • amorphous creatures

Still, if you’re working with any of the above, it’s mainly a case of picking a primary reference part (of the creature in question) on which the pathfinding is based, and extrapolate positions for other connected parts as it’s moving, which is actually akin to what we’ll be doing here in a moment for regular square multitile creatures.

Method 1: Static Approach

One method I haven’t used before but have seen others use is to explicitly map out the spaces available to large creatures, and use that map for pathfinding. Taking the most common 2×2 creature as an example, you can make a copy of your map and block any otherwise open spaces that have a wall or other impassable obstacle to their south, east, or southeast.

multitile_creature_pathfinding_map_decorated

A basic sample map next to its precalculated movement map highlighting all the spaces our ‘D’ragon can access and occupy (green background). This representation assumes the creature’s reference position for pathfinding purposes is the top-left corner of its square.

So as per the above screenshots, pathfinding algorithms would rely on two separate maps, one used for standard-sized actors, and another for 2×2 creatures:

multitile_creature_pathfinding_map

Comparison of movement/pathfinding area available to 1×1 entities (left) vs. 2×2 entities (right).

 

multitile_creature_pathfinding_sample_movement

Our dragon is on the move! See how its top-left corner always stays in the green areas, although the rest of its body might extend into the black.

However, this approach works better for static maps, since changes to the map due to terrain destruction or other factors would require recalculating the pathfinding map(s) (or at least parts of it). I love rampant terrain destruction in my roguelikes, so this approach won’t really work so well in my case. As you’ll see below, an alternative dynamic approach can also take into account more factors, anyway, creature size being just one of them.

Method 2: Dynamic Approach

The dynamic approach starts getting more deeply into how you build your pathfinding system architecture. Amit’s got great resources on A* pathfinding over at Red Blob if you want to read up on that common algorithm for more background. I’m not going over basic A* here, instead looking at how to best apply it so that it can specifically account for creatures of arbitrary size.

For all but the simplest roguelike worlds you’ll often want to have creatures actually examine each potential cell along a path and weigh it in terms of various relevant factors, for example terrain movement costs (which can differ by creature type and terrain?), or the creature’s own capabilities (able to swim? fly? open doors? some other form of environmental interaction?). One nice way to compartmentalize this feature: Callbacks.

In simple terms, when a creature wants to find a path from point A to point B and calls the game’s pathfinding function, it also provides a callback function that essentially contains instructions for how to value cells along prospective paths. A* pathfinding operates by assigning “cost” values to cells until it finds the sequence of moves that can arrive at the intended target for the lowest total cost. So the callback’s job is to just return the cost for a given cell in order to facilitate those calculations.

cogmind_source_entitymovementcallback_header

Cogmind’s pathfinding callback object.

As shown above, Cogmind’s primary movement pathfinding callback that’s sent to the algorithm is actually an object holding multiple methods, originally virtually defined by the base class associated with the pathfinder itself (Cartographer2D). I found it more efficient to split out into multiple methods some of the checks that a callback might need to handle, e.g. isValid() is used to tell whether the goal is a valid movement position, which is probably important to know before bothering to start :P. (Cartographer2d also supports pathfinding via cell-enabled teleportation, but Cogmind itself doesn’t feature that kind of teleportation so the callback object doesn’t define the necessary method.)

Where does this accommodate multitile creatures? First of all, remember that the reference part of the creature is what’s being used to calculate their path--the beginning of the path matches their top-left corner, and the end of the path will be the final location of their top-left corner.

multitile_creature_pathfinding_reference_position_path

A sample path for our multitile dragon, based on its reference part.

The isValid() function* just needs to be sure to check not only whether the reference position at each cell along the path is valid, but that all other relative parts of the same creature are also valid (*and by extension getMoveCost(), which is what checks isValid() before calculating and returning the cost for a cell).

cogmind_source_entitymovementcallback

For reference, here’s the actual source for those methods as used in Cogmind, with some of the very game-specific code left in for demonstration purposes (some of it was temporarily removed to skim down the size and avoid overcomplicating the example). Note how isValid() checks the validity of all constituent parts for large square creatures (of arbitrary size) assuming it’s standing at a given coordinate location.

This dynamic approach doesn’t require precalculating or maintaining any other pathfinding maps, can take into account any number of other factors (regardless of whether they’re changing all the time!), and is clearly just what we need for allowing multitile creatures to move around while also considering whatever else they need to consider.

In summary you get a lot of flexibility by using callbacks for pathfinding. We can add whatever absolute checks we want to isValidCell() and they’ll be applied to any cell the creature might think about occupying, or add checks to getMoveCost() for moves that are allowed but might have a different cost than moving into/through a normal cell. Cogmind doesn’t make especially heavy use of these features, though as you can see there are conditions determining whether or not an entity can use different types of hidden doors, and the cost of pathing through a known trap or area prone to cave-ins is higher (making it less likely).

Aside: The popular roguelike library libtcod (which I recommend in my How to Make a Roguelike talk/article) includes support for pathfinding callbacks! In fact, using libtcod in my early roguelikedev days is actually where I learned about them in the first place :)

Design

Having gotten the primary technical concerns out of the way, there’s also the design side of the equation when it comes to multitile creatures. Surely you can’t just drop them into a world made for your typical 1×1 cell-sized creatures and expect everything to be okay :P

Environment-based Factors

Naturally more open maps are better suited for these large creatures, since terrain is the biggest obstacle to their movement. Although roguelike maps tend to have a lot of tight spaces, even subterranean maps can also be made more hospitable for large creatures if there are at least some open areas for them to comfortably occupy.

For example Cogmind’s most common 2×2 unit, Behemoths, aren’t located in random rooms, but instead specifically placed in areas where multiple rooms and corridors have converged to create a larger space.

cogmind_factory_map_halls_marked_potential_behemoths

According to the mapgen rules, in Cogmind multitile entities (in this case somewhat scary and destructive mobile weapons platforms) might be defending any of these areas.

This ensures they’ll have some room to maneuver and engage threats without being overly restricted, and while it’s true they’ll not always be able to stray too far out of the area they’re defending, they still present interesting challenges when compounded with other factors to complicate situations, like a player fighting a running battle through such an area, or encountering other enemies at the same time and finding it difficult to disengage.

Other challenges arise when there’s no easy way to circumvent a large creature and a confrontation is almost guaranteed sooner or later. This also starts to suggests the idea of “multitile creature as boss or miniboss,” where their extra visual weight signals that they’re not to be trifled with (hopefully with stats and abilities to back up this assumption!).

Since multitile creatures can be problematic for map layouts, it makes sense to limit their overall number in the first place, plus having fewer of them enhances their wow factor anyway. Again: boss material.

On that note, another way around some of these issues is to design special areas explicitly for multitile creatures, like their home/den/native habitat. “Waste” is an example of one such place found in Cogmind, where chutes from Factory zones send scrap for disposal, and mobile Compactors mill about crushing everything.

Compactors are each 2×2 multitile entities, and all corridors in randomized Waste layouts are exactly four cells wide, just barely allowing two Compactors to pass each other. This of course presents a problem for players who have attracted the attention of more than one Compactor, since they can form an oncoming wall of death, so maneuvering to prevent or undo such a situation and slip by can be a useful skill if without the firepower or other means to actually take these chunky bots down.

cogmind_waste_map_with_compactors_tiles

Sample “Waste” map layout with multitile Compactor occupants.

Since we were talking about multitile creature representations earlier, here’s an alternative look at the same scene:

cogmind_waste_map_with_compactors_ascii

Sample Waste map revealed in ASCII mode.

Garrisons are another example of a Cogmind map type in which multitile entities have influenced the design, where there is often a 2×2 Behemoth guarding the central room and double-width corridors extending outward to all four access points.

cogmind_garrison_sample_layouts

Sample Garrison layouts with central open room (potential Behemoth defender!) and wide corridor spokes.

There are still small access tunnels mostly hidden behind walls that might be useful in avoiding a confrontation with the Behemoth in a Garrison, but overall it’s quite a game of cat and mouse if you’re not ready to engage them head on, since due to the layout and Garrison mechanics it’s likely you’ll have to pass through the central room more than once from different angles before being able to actually leave.

Creature-based Factors

Aside from external factors like map design, we can also examine this issue from the other side: What about giving multitile creatures more control over how they can maneuver through, or manipulate, the spaces around them? This is where various mechanics and creature-specific abilities come into play.

Seemingly the most common approach here, and the one that makes the most sense (because, I mean, they’re big creatures, yeah?) is to simply let them crush obstacles and smash their way through terrain! Whether or not this will work for you can of course depend on the environment and other circumstances, but it serves as yet another source of wow factor when some creature practically ignores walls that block normal-sized foes and just comes right through them.

The multitile creature demo in the X@COM video I shared earlier happens to show it smashing through walls, although much of it is out of view while doing so. In that game the system is generalized such that different materials require a different amount of force to knock down/through, so while a soldier can relatively easily jump through a glass window, or a bigger alien can possibly stomp through a fence, it takes a tank or huge alien to smash through walls of brick or stone.

xcomrl_tank_crashing_through_house

A tank driving through a house in X@COM. You can also see it pushed back (and later to the left) due to displacement from falling debris from the second floor after it loses the support of some walls below it.

While pathfinding, A* callbacks can help determine 1) whether a given unit is even able to take a “shortcut” through a given material and 2) whether the potential cost(s) of doing so are not greater than going around it (if possible).

xcomrl_pathfinding_preview_through_walls_vs_not

X@COM pathfinding range comparison between a soldier (center blue triangle) and the multitile tank next to it. Notice how the soldier’s range doesn’t include obstacles, and isn’t able to quickly make past the tall hedge to the north, whereas the tank has the option to just crash right through so it can reach almost all visible locations in a single turn. (Aside: The soldier’s potential path area includes a brighter green portion, which is actually up on the second floor of the house they’re in, via the ‘<‘ stairs around the corner just inside from the garage. The tank can’t use the stairs, so its path is restricted to the ground level here :P)

[SPOILER ALERT: If you’re a spoiler-averse Cogmind player, you might want to just skip this paragraph.] Although not nearly as detailed, Cogmind has a similar mechanic specific to a certain entity. It’s a fairly rare encounter, but players might at some point discover an experimental “Superbehemoth” capable of disintegrating terrain around it, effectively tunneling through it if necessary to get somewhere.

As mentioned earlier, I’ve heard that IVAN also has 2×2 multitile creatures that can destroy terrain in order to move, thereby sidestepping one of the tougher challenges with this type of creature.

Very much in the theme of ASCII and turn-based grids and all the things that speak to a “limitations breed creativity” mindset, in trying to integrate multitile creatures into a roguelike you can always experiment with other forms of movement and enabling mechanics, too.

Maybe a multitile creature can temporarily reshape itself to squeeze through narrow areas and unexpectedly pop out on the other side? Maybe they can teleport or use some kind of network of gateways? I still haven’t actually done it, but one of the ideas I think would be fun to implement is a giant robot that can dispatch a bunch of tiny engineering drones to excavate pathways on the fly when it needs to, and they rebuild walls and terrain behind it after it’s passed.

Another approach here is to allow multitile creatures more flexibility in how they can attack, essentially projecting their sphere of influence beyond their movement range. Early in Cogmind development this was actually one of the first ways I made Behemoths more formidable than they started out, since they are otherwise huge lumbering bots that could be evaded by keeping obstacles between yourself and them. Well they already have powerful enough weapons, so I just made their AI much more aggressive, willing to fire their cannons through machines and terrain to get at targets.

cogmind_escaping_destructive_behemoth

Behemoth says we aren’t going to get away so lucky. Double bonus when the machines they’re shooting through are explosive :)

So if the mechanics/environment/theme are suitable, consider giving multitile creatures the ability to attack and destroy terrain, or even just attacks that can penetrate terrain and other objects.

Or maybe they send out other attackers to engage targets? This could force the player to come to them in order to the deal with the source of the ranged threat, not unlike the stationary dispatchers of POYLBOT-7.

Miscellaneous Issues

You’ll no doubt discover more complications stemming from the introduction of multitile creatures, some of them specific to your mechanics and needs.

Origin vs. Target

One of the more common ones you don’t normally need to think about in a roguelike is the specific origin or target of an attack, in cell terms, considering that creatures might occupy more than one grid position. Perhaps if you have an odd-dimensioned multitile creature (e.g. 3×3) you might want to use its center point for this purpose. Or if you have special mechanics and a facing component there is/are actually a designated point on the creature where its attack(s) originate.

7drl2020_mechrl_attack

MechRL, a 7DRL from 2020, has you building your mech from visible parts that could easily use their respective locations to serve as the origins of attacks.

In my case, for the origin I always select the point on the attacker that is closest to the defender, and have it target the nearest point on the defender. That’s for AI-controlled units, anyway--the player has more freedom to select any cell occupied by the target, making it somewhat easier to acquire a clear line of fire on partially obscured targets. It would be better to allow the AI to target any visible cell as well, but I felt it wasn’t really needed, or worth adding that complexity, for my purposes.

AOE

If you’ve got area-based effects like explosions, as many roguelikes do, that’ll be something else to consider. Should multitile creatures take extra damage/effects separately for every one of their tiles within the radius?

Having larger entities take more AOE damage like this is an option if you think it balances well given your mechanics, and players may even sometimes assume it in tactical games with a heavy emphasis on grid-based play (in my experience it’s not an entirely uncommon question among players).

Personally I think it makes balance much more difficult to achieve when it comes to Cogmind mechanics, so I prevented that from being a thing--regardless of size, a single unit can only be affected once by a given AOE attack.

cogmind_tactical_quantum_warhead_vs_behemoth

Sorry big explosion, you can only hit that Behemoth once.

I simply keep a record of all the entities already impacted by each active AOE effect, in order to prevent further segments from applying the same effect. As per the map object architecture I shared earlier, each Cell occupied by a multitile Entity stores a handle pointing to the same Entity, so marking the first one affected by an expanding radius naturally makes all the others “immune” to the same event.

xcom_cyberdisc_grenade_death

In the original X-Com (and therefore X@COM), explosions separately impacted every segment of a large target within their radius, like this 2×2 Cyberdisc. They have high resistance against explosives to compensate and won’t generally die if only a small part of them is hit.

I ended up needing to take the same precautions for Cogmind’s penetrating weapons as well (capable of piercing a target and going on to affect additional targets behind it)--I didn’t realize until 2017 that these weapons were disproportionately effective against larger targets, since they could pierce one section and then hit one or more additional sections, affecting each separately. Now this does make logical sense, sure, but balance-wise it’s not so compatible.

cogmind_penetrating_behemoth

In theory this shot could penetrate two separate pieces of the Behemoth (but only affect the first) before hitting its target (which might also itself be penetrated :P).

Terrain

You might also need to consider how multitile creatures interact with various types of terrain. Like what happens if they simultaneously occupy locations with different or even incompatible effects? How are variable terrain-based movement costs applied?

For this and other reasons, it’s a good idea to add this kind of creature early in development so that you can take them into consideration throughout the process. Introducing them later could be quite problematic since you have to uncover and resolve all these issues retroactively rather than building each consideration into the system bit by bit as you encounter it.

Cogmind doesn’t include many terrain-based factors, although one example I can provide here is traps.  Chute traps, which suck units down into the ground into another area (the aforementioned Waste!), only occupy a single space, so they essentially ignore larger entities that “wouldn’t fit” :). Most other traps however, like those of an explosive nature, are triggered normally for every cell the entity steps on, meaning it’s possible to set off more than one in the same turn.

3D

Few roguelikes take advantage of 3D grid space, but while we’re on the topic we might as well cover some points regarding adding a third dimension to our multitile creatures.

Earlier I talked about square shapes being by far the easiest to work with when it comes to multitile creatures, though the z-height of such a creature doesn’t necessary need to match the other two dimensions. A 3×3 creature with a height of 2 isn’t going to operate significantly differently from one of height 3. We are, however, assuming that height is uniform across its area. You can easily have 3x3x3 cube-shaped creatures, flatter 3x3x2 creatures, or even tall and narrow 1x1x2 creatures.

In most cases you’ll be able to simply extrapolate everything we’ve already done for multitile creatures into the third dimension--like our pathfinding callback needs to check not just two dimensions, but three. I did this for X@COM, where I added 3D creatures and used the top-left corner of their lowest/base level as their reference point.

xcomrl_multitile_creature_height3

A multitile Colossus in its 5x5x3 glory, showing the three z-levels it occupies next to a house, and with its reference point highlighted.

And although a full discussion of how to represent a 3D space in a top-down 2D map is beyond the scope of this article, it’s worth pointing out that with creatures like this it can be beneficial to allow a way to see them from the side as well. I first talked about side views back in 2011 when I implemented this feature for X@COM, and later shared how this can be applied to viewing 3D multitile units from the side as well.

xcomrl_multitile_creature_side_view

Here you can see the Colossus being viewed from the side as well, in a popup window that appears across the top there to display the line of sight from a different angle. That’s a lot of @ :)

This makes is easier to visualize targeting their different z-levels in case there are obstacles blocking line of fire at a given height.

More?

I’ve covered a lot of the main multitile creature topics here, but it’s a big one (haha) so feel free to ask about related issues or anything here you’d like clarification on!

Update 240903: I have since further expanded Cogmind’s feature set with yet more new behaviors to support multitile creatures, including wall smashing, pushing, crushing, and multiple improvements to large ally movement and navigation. Details in this article.

Posted in Design | Tagged , , , , | 5 Responses

Special Mode Design: Battle Royale

Every good game needs a Battle Royale mode, right? Okay maybe that’s something you’d be more likely to expect from an actual online multiplayer AAA title looking to jump on a bandwagon, rather than a traditional roguelike :P

Nonetheless, I did build one for Cogmind! It was going to be Cogmind’s next April Fools Day event, with the idea originally sparked by a player’s “what if”-style comment on Discord earlier this year.

If you’re not familiar, “Battle Royale” is basically free-for-all survival of the fittest gameplay across a shrinking play area filled with random gear. So here you’d basically be up against a bunch of other Cogmind-like bots trying to survive. I’d never actually played any of the staple games in this genre, my first and only relevant experience coming during 7DRL reviewing for 2019, when I played B-Line, a take on the BR genre within a traditional roguelike framework (original video, when I was going back and playing the top 7DRLs for the year).

I say “was going to be” the next AFD event because although it reached a playable and somewhat fun state, I ended up cancelling it! I’ll talk more about why later on, but first let’s look at the development process and its challenges and solutions…

Exploration

Like many ideas, as a pure concept “Cogmind: Battle Royale” sounded pretty interesting, but I wasn’t sure just how feasible it would be on a technical level. I mean sure it’s doable, but would the cost be worth it? A pair of very important questions needed to be answered first, so development started with an exploratory phase directed at answering them before actually building this as a special mode.

The first question had to do with factions. Cogmind’s whole relationship system is based on a limited set of hard-coded factions, and there are only 10 of these internally. How to build a system to support free-for-all hostilities between numerous robots? The most straightforward solution would be to dynamically create a unique new “faction” for every single robot. What might this break? I had no idea, since lots and lots of assumptions had been made and reinforced since development began in… 2012 for 7DRL xD. I wasn’t sure how flexible the faction system was, but this was a natural place to start since it would be much easier to test than question #2 to come. I simply created a bunch of extra factions and dropped a single Grunt in each, heading off the few problems that might result and sure enough, each one was running around shooting anything that moved and otherwise behaving as expected. Yay!

cogmind_battle_royale_first_faction_experiment

Grunts successfully wreaking havoc on -10/Materials, and each other.

The second question would unfortunately be much much harder to answer. It would take a while to explore the feasibility of an AI with Cogmind-like behavior, having the ability to put together and maintain a build from found and salvaged parts, and also manage inventory.

Now if I was just doing this purely for a short special event then I’d be less willing to venture into complex AI territory, essentially because it’s an endless time sink (!), but I liked how this little detour could bring me one step closer to another project I’ve thought about off and on over the years: Having a bot that can actually play Cogmind.

So it was worth a shot and I spent some days hacking together an AI much more complex than anything else in Cogmind (robots normally have relatively simple and predictable behaviors unique to their class, where interesting scenarios are produced by interactions with numerous AIs at once rather than especially smart and capable individuals).

AI Development

Technically I wasn’t starting from scratch on this AI. Quite conveniently there was already another smaller stepping stone in place: Abominations from last year’s Halloween event.

Abominations in that mode are capable of gathering parts to build themselves, but do so very haphazardly and take a lot of shortcuts, being capable of telekinetically attracting any parts they see and pretty much ignoring balance because they don’t need to worry about energy or heat and always have a permanent form of natural propulsion and built-in backup weapon. For build management purposes, architecturally there’s a pretty big difference between an AI allowed to both decide on and complete an action in a single moment, and one that makes a decision then follows it up over multiple turns in a changing environment.

In short, Abominations are a far cry from a true Cogmind-like inventory management AI. But they did require repurposing the player item autoswap feature for AI use, which would form an important backbone of the new AI. As small as it was, at least that bit was already done. To recap, back in Alpha 5c (2015) I added the ability to use a series of simple and predictable rules and to automatically perform obvious inventory management actions on request.

cogmind_upgraded_autoreplace

The original diagram I made to explain the smart/automated inventory management system back when it was first added.

Nearly all the same logic could be used by AIs as well, so we have a pretty solid foundation to work from!

The new AI clearly still had a wider range of needs, though, so at this point I didn’t actually start creating the new mode or a Battle Royale map, instead basic AI testing simply happened in a regular Cogmind map. In the first phase of development, I added the following features in this order--the AI could:

  • use core hover (normally all robots other than the player are immobile if they have no external propulsion)
  • switch to different faster forms of propulsion if more efficient
  • collect parts to fill empty slots and also upgrade existing attached parts (however, because this is the AI rather than a player, it can take even more liberties with the swapping, for example removing inactive propulsion that doesn’t match the current movement mode to make room for more of the active type)
  • manage mass vs. support, for example avoiding adding so much mass it goes past a desired overweight threshold, and tries to shed heavier parts if it’s suddenly gotten heavier due to build changes, to maintain speed
  • wander the map while improving its build without fleeing under fire (since it needs to prioritize searching for and collecting weapons if it’s been disarmed)
  • seek out Matter and Protomatter
cogmind_battle_royale_AI_first_attach_sample1

The first-ever AI to pick up its own parts, when I first started the project.

 

cogmind_battle_royale_AI_first_attach_sample2

A slightly less stupid (but still very stupid) later version.

Here I also considered adding ramming to their basic abilities, so that like Cogmind the AI could also have a useful attack while disarmed, but found there were too many complications so although I figured out how it would be possible, ultimately decided it wouldn’t be worth it for this event.

I didn’t get into personalized behavior of any kind, like AIs with a preferred style, since there’s already plenty of randomization and variety coming from the many many parts and their conditions at a given time. This would be a natural future step for a more involved project, however.

The complete non-combat portion of the AI can be summarized with pseudocode like so:

cogmind_battle_royale_AI_build_management_pseudocode

Cogmind Battle Royale AI pseudocode (non-combat state).

Once the Battle Royale AI reached this stage, it had started getting complex enough that it was really annoying trying to fine tune it while working in regular Cogmind/0b10 maps where there are too many distractions. About time to make the new map!

The Arena

The idea behind this mode was that there’d be only one map, the first ever Cogmind mode to pare down the game into such a small “world.” Initial plans set it at 200×200, the same size as Factory/Research, based on my experience designing maps of that size relative to movement speeds, the ranges of sensors and weapons, and perhaps most importantly the total number of participants. 30 seemed like a good number.

At first it was going to be like a typical Cogmind room-and-corridors style map, with a final central room on which the last living bots would naturally converge as the accessible area shrank. Here I was just starting out getting the map generator building out from the central room:

cogmind_battle_royale_mapgen_early_wip

Early WIP Cogmind Battle Royale map layout sample with central room.

As I was fooling around with trying to get it to do what I wanted, a different better idea popped into my head: What if instead of using the normal subterranean-style maps we instead directly converted it to a sort of overland map where rooms are instead “structures”?

This would significantly open up the map, creating additional pathways and a sort of “organized chaos” in the form of a little town without clear straight roads, but all locations are still accessible.

cogmind_battle_royale_mapgen_wip_4

Sample Cogmind Battle Royale map layout.

 

cogmind_battle_royale_mapgen_wip_1

Sample Cogmind Battle Royale map layout.

I like it! Some of the strategy implications of this approach:

  • makes it much easier to navigate and reach the center (if necessary one can technically even just blow through walls to reach the center once you have orientation)
  • makes it easier to escape if you’re faster than a pursuer, harder if you’re slower (and harder to give chase if you’re slower)
  • easier to spot enemies and be spotted because generally more open
  • less likely to get unnecessarily trapped by the closing circle of death

Plus it’s also kinda neat just to have a different kind of map to play around with.

I called the map “Wartown.”

Mechanics and Features

We’ve got a basic AI and a basic map, next up are features!

  • Everyone spawns in their own room, usually out near the edges of the map.
  • Everyone starts with the same base stats and slot count, but completely randomized gear. It’s more interesting to be forced to adapt, but rather than having players gradually collect their parts from around the map, that entire process can be sped up by simply starting with it. This is more appropriate for Cogmind anyway, because one or two parts alone isn’t enough for an interesting or fun build--you really need a larger collection to be at all effective or to more quickly convert into something effective.
  • Random parts are also scattered across the map (some items found in the regular game are excluded, however, generally things that wouldn’t make sense in this mode).
  • There is no Matter cost associated with attaching parts. This rule change was partially put in place to make inventory management a little easier on the AI (no need to consider Matter waste alongside repeated build tweaking), and also to speed up gameplay in general because it would otherwise be easier for players to run low on or out of matter.
  • Attacks enforce RPGLIKE-like damage redirection where some part damage is transferred to the core, but in this case the rate is only 50% (and armor transfers only 25%). I wanted parts to still take plenty of damage and be destroyed, but at the same time didn’t want too much damage focused on target cores because otherwise bots wouldn’t last long enough in a confrontation, at least not long enough to allow for some tactical variety.
  • Cogmind’s parts do not have their usual high-integrity critical strike protection, and no bot can have their core automatically destroyed by a critical strike.
  • All bots use the normal player-Cogmind rules for increasing system corruption when his with EM damage (so it’s no longer as much of a threat to other robots as it normally is).
  • In addition to salvageable parts, destroyed bots drop both Matter and Protomatter, the latter of which does not decay and is applied in full each turn where necessary/available just by standing on it. Borrowing Protomatter from RPGLIKE mode was essential in maintaining balance because without a way to repair, attrition would inevitably lead to death after one or more confrontations.
  • On destroying a target, the attacker gains a new random slot (awarded on the following turn). This allows for a form of progression, ensuring it’s less advantageous to simply hide from everything and pop out at the end to kill the last remaining enemy, since whoever they are they’re quite possibly more powerful by then.
  • Ambient heat slowly spreads from the four corners of the map towards the center. This is the so-called “circle of death” mechanic important to Battle Royale games in order to force players into eventual contact with one another while keeping it from getting boring. I like the idea of using heat rather than damage to achieve this goal because it builds gradually as it approaches and builds with good dissipation can afford to stay near or in the hot area for longer, not to mention heat has different kinds of side effects. In the end no build can withstand the full intensity of the heat, of course, it just allows for more or less flexibility in that area. The AI is aware of the heat area and acts accordingly.
  • Once only a single bot remains, an exit appears in the center of the map.
cogmind_battle_royale_heat_sample4

Heat encroaching on the map’s center room.

The heat’s color effect is achieved via additive RGB based on the actual ambient heat per cell, so maximum heat actually appears yellow (although the animation still plays out for all hot locations so it’s not a constant yellow).

cogmind_battle_royale_heat_sample2

Full heat has filled the map, though it cannot enter the central room.

 

cogmind_battle_royale_heat_sample3

Catching the heat mid-glow after it’s covered the map. AKA making procedural art.

 

cogmind_battle_royale_heat_spread_sample1

Recorded bird’s eye view of heat expanding from one corner over time.

Each player is also assigned a random name with their player number attached. For this I wrote up a list of hundreds of Cogmind-relevant words for use in compounds.

cogmind_battle_royale_name_sample2

Sample generated Battle Royale “player names.”

Cancelled!

Normally I would’ve cancelled an idea a lot sooner in development than this (like the real-time arcade version of Cogmind I never even wrote about here but released to patrons at one point :P) but due to the investment required to develop the necessary AI, it took a while to reach an MVP state so I didn’t get to testing whether it was actually a good idea for a while xD

As soon as it was semi-playable I immediately realized it wasn’t quite going to work, at least not without a huge amount of additional investment that just wouldn’t be worth it for a special mode.

In the end, Cogmind’s mechanics and gameplay weren’t designed to be all that compatible with 1v1 fights between equals, which is what Battle Royale tends to boil down to--you have a bunch of essentially identical players all vying for the win, but Cogmind is meant to be a more tactical one vs. many game (or many vs. many, with factions) in which most bots die quickly and the situation keeps changing as a result, rather than just sitting in one position pelting enemies, which is often what BR mode using Cogmind mechanics ends up as. Certainly you can do a fair amount of stationary farming in regular Cogmind, too, but there’s still a lot of thinking that goes into the plan before the fighting even starts, and that determines how the fight will be likely to go--this is something the AI can’t really do on an equal footing with the player, and it ends up being less interesting as a result.

In BR mode, AIs spot a target and then sit there doing their best to pummel it to death if they’re capable of attacking. Without a much smarter tactical AI that can come up with environment-related tactics and exercise more forethought and better react to spacial disadvantages, it just doesn’t work well.

In hindsight this all should’ve been obvious or could be realized via thought experiment alone, but I was clearly hyperfocused on the AI development aspect and really wanted to give it a try anyway :P

But Playable!

Before stopping work on BR mode, however,  I actually put some more hours into it so that it’d be a more complete and fully playable prototype for patrons who’d like to try it out, and feedback was actually decent! (maybe I was too harsh on the mode and should bring it back one day with a bit more development? :P) The heat mechanic, among some others, is an example of a feature that wasn’t even implemented yet when I first decided to cancel--I admit I also really wanted to see what it might look like :D

I released a special Battle Royale build on Patreon here, and since then have updated the build several more times (in place on the original page) to address bugs and further improve the AI.

cogmind_battle_royale_fight1

A rather quick and explosive skirmish in BR mode.

Features missing from this mode, as released, but that I would have addressed later:

  • prefabs (including special stockpiles and especially better treatment for the center area)
  • more attention to machines (all I did was throw some random machines into the mapgen pool, where ideally the types and compositions would be selected for both better gameplay and atmosphere)
  • message log details about who is destroying who
  • Haulers that teleport in and carry lots of great gear, and everyone gets a ping of their locations (works as a mechanic to force confrontations and give extra rewards those who succeed)
  • different enemy colors to reflect their state
  • different game over screen, a leaderboard ranking all the “players” (unique scoring system) and showing their build classes
  • even better AI :P
  • a more balanced experience overall, or at least “balanced” to maximize FUN

Results

Fortunately most of the work that went into this mode didn’t go to waste. Cogmind Battle Royale may have been cancelled, but the AI lives on! I’ve continued to improve on it (vastly!) for use in a different special event, and there is at least one part of the regular game where I’m interested in incorporating just such an AI. So I’d consider this project a success overall.

This side project also resulted in some general AI improvements and even discovering and fixing one relatively new AI behavior bug that hadn’t yet been reported.

I’m not sure whether I’ll ever get to that AI that can reasonably play the game, although the next little step towards that goal is only barely beyond what we have now--just take the first exit spotted ;)

Posted in Design | Tagged , | 6 Responses

What is a Traditional Roguelike?

In the beginning there was the Berlin Interpretation… Just kidding, believe it or not there were arguments about what constituted a roguelike long before 2008, but in the decade since then we’ve entered a new era in the wider roguelike genre in which that lone word itself has become increasingly diluted as mainstream games easily overtook the original more closely related set of games in popularity, allowing the common definition to shift and expand almost beyond recognition. Depending on who you ask now, “roguelike” can refer to games as disparate as these:

nethack_vs_tower_of_guns

Spot the roguelike.

At the top we have NetHack, and on the bottom is Tower of Guns, where the latter and other equally distant examples (borrowing maybe one or two aspects of roguelikes) are generally referred to as “roguelites” by people familiar with the time before this newer expansion.

Personally, I am very much in support of the expansion of the genre in every direction, injecting roguelike values into other genres to create new types of enjoyable experiences. Although in some cases these games may veer pretty far from what some will accept as roguelikes, games that aren’t too far out on the fringes are also known to sometimes lead new players to discover “traditional roguelikes,” which is great!

Note: This article will sometimes simply use the word “roguelike” to mean roguelikes in the traditional sense unless otherwise stated.

One thing worth pointing out right away is that although I’m writing up a narrower take on roguelikes here and even recently started a community dedicated more explicitly to “traditional roguelikes,” I don’t recommend that developers try to adhere to a strict definition of what anyone thinks roguelikes are or should be. Too often in dev communities we hear from prospective developers worried that their game is “not roguelike enough.” Over on r/RoguelikeDev the definition is basically “whatever you think it is,” because interesting game development is often about testing and breaking rules and boundaries, after all. Trying to shoehorn a game for that perfect fit into a specific definition isn’t a really meaningful endeavor if it’s going to warp the game idea in a bad way or keep it from reaching its full potential. Develop the idea, not for a genre.

On that note, it’s also important to realize that “traditional” doesn’t mean that we’re necessarily talking about only old games here! (I would dub those older representatives “classic” roguelikes.) New traditional roguelikes are popping up every year, featuring plenty of innovation while remaining squarely within the traditional sphere.

r-TraditionalRoguelikes_banner_image

For r/TraditionalRoguelikes I put together a banner of images from various roguelikes, a mix of old and new spanning decades (click and zoom for full-size).

Definition?

Giving “roguelike” a definition to satisfy everyone is an impossible task. Even within the core community of roguelike players well aware of Rogue, whether or not a game should be considered a roguelike is commonly attributed to each individual’s “feeling” and whether a given game adheres to the “spirit” of the genre as they understand it. Naturally these opinions are going to vary as much as these players’ respective experiences, even more so in a world surrounded by an increasing number of games each day. As I’ve seen over years of repeatedly watching relevant arguments play out online, many different perceptions of the roguelike spirit are clearly irreconcilable. The reason behind this was pretty eloquently summed up in this comment by silverlarch, reproduced here:

“Traditional roguelikes […] share specific qualities with Rogue, namely being grid/turn-based with procedural generation and permadeath. That’s not all Rogue is.

Let’s compare some games.

Rogue is a grid/turn-based dungeon crawler with full procedural generation and permadeath in a fantasy setting. It’s about descending through a multilevel dungeon to find the Amulet of Yendor and return it to the surface. It has no RPG mechanics: the only stats are health and strength. Your character is defined by the equipment you find along the way, and health increases with experience gained from killing monsters. You have to deal with identifying potions, scrolls, and items that may be beneficial or harmful. The dungeon is filled with monsters, traps, and secret rooms.

Tales of Maj’Eyal is a grid/turn-based dungeon-crawling RPG with permadeath and some procedural generation in a high fantasy setting. It has character classes and talents, experience-based leveling, meta progression in terms of unlocking new classes, an overworld map, quests, a skillbar, non-dungeon areas like towns, interactive friendly NPCs, and extensive shops. ToME is a traditional roguelike, but not a whole lot like Rogue.

Cataclysm: Dark Days Ahead is a grid/turn-based open world survival game with full procedural generation and permadeath in an apocalyptic zombie sci-fi setting. It has no end goal, RPG mechanics and a wide array of skills for character progression, base-building, vehicles, potentially friendly NPCs, quests, special abilities via mutated or bionic character upgrades, weather and time of day, injury and morale systems, and extensive crafting. C:DDA is a traditional roguelike, but really nothing like Rogue.

Brogue is a grid/turn-based dungeon crawler with full procedural generation and permadeath in a fantasy setting. It’s about descending through a multilevel dungeon to find the Amulet of Yendor and return it to the surface. It has no RPG mechanics: the only stats are health and strength. Your character is defined by the equipment you find along the way, and health and strength are increased by potions. You have to deal with identifying potions, scrolls, and items that may be beneficial or harmful. The dungeon is filled with monsters, traps, secret rooms, and minor puzzles. It has recruitable NPC monster allies, minor stealth mechanics, and environmental interaction in the form of gas, liquid, and fire mechanics. Brogue is a traditional roguelike, and about as close to Rogue as modern roguelikes get.

Unexplored is a realtime/pausable non-grid-based dungeon crawler with full procedural generation and permadeath in a fantasy setting. It’s about descending through a multilevel, branching dungeon to find the Amulet of Yendor and return it to the surface. It has no RPG mechanics: the only stats are health and strength. Your character is defined by the equipment you find along the way, and health and strength are increased by potions. You have to deal with identifying potions, scrolls, and items that may be beneficial or harmful. The dungeon is filled with monsters, traps, complex puzzles, and occasional secret rooms. It has minor stealth mechanics, occasional small shops, minor crafting, minor meta progression in the form of unlocking new basic starting equipment, and environmental interaction in the form of gas, liquid, and fire mechanics. It’s basically a realtime Brogue clone with a better proc gen engine and a few added mechanics. It is not a traditional roguelike, but very much like Rogue.”

Bullet points can’t accurately capture the breadth of the genre, even in its traditional sense.

At the same time, as I thought about ways to describe the “feeling” that adequately captures the roguelike spirit, I realized that even such a description can’t be meaningful in a vacuum--a list of core features is still a necessary component.

Now I normally don’t bother wading into the endless arguments on this topic, but having created a new community more explicitly centered around them I essentially forced my own hand and needed to write something xD. The aim is to try to be inclusive of at least a decent percentage of “personal definitions” floating around the core roguelike community.

Here goes!

xkcd_standards

xkcd: Standards

What is a Traditional Roguelike?

First of all, hopefully you’ve actually read the above background info for all-important Context, and didn’t just skip down here :P

While “roguelike” is a somewhat more permissive term as used these days, traditional roguelikes have a stricter focus requiring all of the following elements:

  • Procedural content: Some content, often the environment, is procedurally generated. This increases replayability by keeping the game interesting and surprising on repeated runs, while also making gameplay expertise more about mastery of tactical and strategic knowledge. Much of the play time in a roguelike is spent exploring, so procedural maps in particular are an effective tool for generating fresh experiences both on a local (different enemy compositions and room layouts for tactical analysis) and grander scale (different routes or orders to visit world locations?), especially where there are many types of environments and inhabitants to draw on. Maps can technically be procedural to different degrees, where one may have static vaults/prefabs integrated into larger generated maps in order to provide particular points of interest or even areas outwardly recognizable for their gameplay meaning. Note that even in identifying procedural content as a vital element in traditional roguelikes, consistency is still important in order to allow for learning and eventual mastery of the relevant systems.
  • Permadeath: Death is permanent. To retain the element of surprise in a procedural world, consequences matter. Traditional roguelikes are “run-based” games in which save/load features exist only to continue playing at another time, rather than to redo actions and therefore lighten their meaning. As run-based games there is also little to no metaprogression--you grow as a player through knowledge and skill, but these aren’t explicit benefits carried over from one run to the next. A small amount of metaprogression is not a problem where there is a hard cap which is quickly reached and serves some other purpose in the design without breaking the consistency of its replayability. Growing ever more powerful with each run is a very anti-roguelike metamechanic, whereas unlocking lateral game content is technically fine. Note that some traditional roguelikes allow players to optionally forgo save/load restrictions, either to avoid permadeath or even to redo actions; at that point they’re not being played as a TRL, although this option doesn’t negate the game’s status as a traditional roguelike altogether unless that is the default and expected method of play for which the game was designed.
  • Grid-based: Traditional roguelikes play out on a discrete grid with cell-wise movement and actions, aiding in tactical calculation. Combat must be non-modal and take place on the same map grid where exploration occurs, but non-modality is not a requirement for interaction with shops, towns, or a world map.
  • Turn-based: Actions are carried out in a turn-wise manner, with the player taking an action followed by all other entities acting in turn. Turn-based action gives players unlimited time to react to changing and unexpected circumstances and weigh the permanent consequences in formulating a response, testing analytical skills rather than physical reflexes and quick thinking.
  • Single player-character: The player controls a single primary character represented on the map, and the death of that character is the end of the game. It’s okay to have AI-controlled allies, partial control over allies, or even switching player control to an alternate character by means of in-game abilities, but the normal state of the game should not be controlling multiple disposable “units.”

As you can see from the list above, “traditional roguelike” isn’t nearly as limiting a category as one might think. Even within these confines there is practically limitless space for innovation on mechanics and content and theme.

But again there is also a second component to fully describing a traditional roguelike, the feeling that’s hard to put into words but both born of and complementing the list of features above.

Darren Grey touches on some of this in his description here:

“…in my view it’s inherently replayable, capable of surprising the player on many playthroughs. It rewards cleverness and tactical thinking. It cannot simply be learnt by rote, but it can be mastered with experience. It emphasizes gameplay before aesthetics, concentrating on making that replayable experience fresh and engaging on each play. It’s unforgiving, but all the more rewarding when you perform it well, offering an honest sense of achievement and satisfaction. Much of this satisfaction comes from the internal knowledge of having done well at the game itself, rather than artificially constructed rewards.”

(This could still be said to describe games that aren’t roguelikes, but it at least further links many games that also share the list of roguelike characteristics.)

With regard to “gamefeel,” I find roguelikes are both challenging and addictive in a way similar to many multiplayer games in that you’re up against uncertain challenges that are operating within parameters established by the game world, only this is the slow singleplayer version of that experience. Roguelikes rely on multiple or even numerous overlapping systems to create a complex web of emergent possibilities, increasing both the number and variety of challenges as well as the number of tools available for problem solving in any given situation. As a result they’re highly replayable, and you’re frequently encountering new and changing conditions. It’s the player’s job to navigate those systems both as the in-game character and as the meta player. This is where the heavy decision-making focus comes in (lots of variables to consider!), and while roguelikes are often played quickly, you sometimes need extra time to figure out the best course of action (hence the focus on turn-based action on a discrete grid), since any negative consequences could either immediately cut the run short or potentially reverberate throughout the rest of the game, thus adding weight to each decision.

/u/aaron_ds also has a good overview covering the mix between feeling and feature with roguelikes rooted in “accurate threat assessment in tactical scenarios generated by systems.”

In the end all the elements of a roguelike detailed in the earlier list strongly complement each other to produce a satisfying “roguelike gestalt,” and removing or altering any of these is likely to destabilize that balance and fundamentally change the experience. The result might be like a roguelike, but is likely already more appropriately classified as something else at that point. For example basing the gameplay on multiple controllable characters is more of a tactics game (X-Com!) with a different style of pacing, removing permadeath pushes a game into more typical CRPG territory where consequences are not nearly as pronounced, and adding real-time elements requiring quick reflexes or at least limiting decision-making time belongs in the explosive “action roguelike” subgenre.

Examples of classic roguelikes (more here):

Many classic roguelikes have since gained one or more optional tilesets, although all began with ASCII as shown below.

roguelike_sample_rogue

Rogue (1980)

 

roguelike_sample_nethack

NetHack (1987)

 

roguelike_sample_angband

Angband (1990)

 

roguelike_sample_crawl

Crawl (1995)

 

Examples of modern roguelikes:

Among more modern roguelikes you can see a significantly wider visual variety, including a number that don’t even support ASCII, or are at least don’t use it by default.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

In the r/TraditionalRoguelikes sidebar I’m also maintaining a list of of excellent newer/underplayed roguelikes people can explore. As of this writing the list includes:

 

 

 

 

 

 

 

Features that might suggest a roguelike, or be related to them, but aren’t absolutely necessary for most players:

  • ASCII: Minimalist aesthetics with visuals boiled down to sometimes little more than the essential tactical factors are pretty common among traditional roguelikes, but not required since graphical fidelity is tangential to roguelikes being rooted in gameplay mechanics.
  • Identification system: All the way back to Rogue, many roguelikes include a system of unknown items that may be identified by external methods, risking their use, or deduced through other means. This is one of many systems to interact with, and adds yet one more strategic aspect to exploring a procedural environment.
  • Inventory management: Although very common in roguelikes since an inventory offers the player a familiar and intuitive way to collect and organize the various tools for tackling challenges, technically a roguelike could achieve that goal using other means such as abilities and other types of resources.
  • RPG elements: Stats, character classes, and leveling--roguelikes tend to have some amount of these, if not many, to provide the player with pathways for progression and further increase options for replayability and hooks for interactive systems.
  • Monster-player similarity: Mechanics governing players also apply to monsters, e.g. both can have inventories, equipment, use items, cast spells, etc. Although not a direct requirement, on the development side this approach does a good job of facilitating the wider range of clever interactions for which the genre is known, especially where other entities are using the same internal architecture as the player and therefore a greater number of features and interactions can easily be applied equally to both.
  • Dungeon environment: In the early days a majority of roguelikes took place in fantasy-themed subterranean maps composed of rooms and corridors. Today fantasy roguelikes still outnumber other types, but even among traditional roguelikes the genre has since expanded into many different types of environments as well.
  • Keyboard support: Ideally most or all actions are accessible without using the mouse, allowing players to quickly transition from one important decision to the next.
  • Quick action resolution: Actions carried out by both the player and other actors are usually instantaneous and involve minimal or no animation (or at least easily skippable animations), giving the player full control over the pacing. By extension there’s also usually a message log recording details of events as they occur in case the player misses something or needs additional details.

Examples of features/game types that aren’t considered traditional roguelikes:

While many of these might fall under the wider roguelike umbrella, and people who enjoy traditional roguelikes will likely enjoy them, this doesn’t make them traditional roguelikes :P

  • Real-time elements. Physical reaction times shouldn’t be an influential factor in roguelike play.
  • Games with no local map at all (lots of card-based games do this).
  • Puzzle-type roguelikes. These are often deterministic and play out on a small board without involving exploration, featuring lower levels of resource management (if any) and fewer abilities and problem-solving tools in general.
  • Modal combat, for example JRPG-style encounters which occur in a space off the explored map.

History and References

Previous definitions:

Other references:

r-TraditionalRoguelikes_banner_images_block

Also I like collecting traditional roguelike images, got tons of ’em :)

Posted in Uncategorized | Tagged | Leave a comment

Special Mode Design: RPGLIKE

cogmind_beta_9.3_rpglike_logo

Banner image from the Beta 9.3 “RPGLIKE” release.

This winter holiday season I released Cogmind’s seventh special mode, “RPGLIKE,” and quite unlike other events which have not necessarily been designed as permanent parts of the game to promote going forward, this one definitely is, and serves a specific purpose in that regard.

A number of people are interested in the world of Cogmind, but find that it’s extremely unique mechanics don’t click for them, most specifically the rampant item destruction, heavy item management requirements, and generally decent level of tactical prowess required to succeed. There are difficulty settings to somewhat mitigate these aspects, including even more recently the ability to quick save/load in all but the hardest mode, but those still don’t change the fundamental nature of adapting to loss and dealing with natural attrition, characteristics that permeate the normal Cogmind experience by design.

So I thought I’d try an experiment in attempting to convert Cogmind gameplay into an optional experience more similar to other traditional roguelikes. This means a number of things, most importantly a system for permanent progression, the ability to heal yourself, and items that don’t break.

Early Concepts

The earliest ideas for this mode were even more extreme than the final result (which is itself a pretty extreme departure from regular Cogmind :P). They assumed your parts would be completely immune to damage, and that you could simply heal either by “resting,” or gradually over time--basically your usual CRPG/roguelike mechanical tropes.

However, the design went through a number of iterations before implementation even began, because as I tried to run the numbers and make sure there would be some semblance of balance (also taking into account likely player strategies given each scenario), it became apparent said tropes in that form really couldn’t exist in the world of Cogmind and keep the game fun at all. I mean sure they’d be fun insofar as it can sometimes be fun to just run around practically invincible destroying everything, but there would basically be no challenges unless I also put a lot of focus on changing the nature of the existing challenges.

But with a mode already planned to be this big, it wouldn’t be reasonable to take on yet another huge amount of work on top of it, just for a special mode, so those starting points inevitably had to be scaled back… but we’ll get to that later. The implementation really started in earnest with one of the less questionable aspects: gaining XP and using it to choose permanent upgrades.

Upgrades

Instead of the usual evolution effects with each new depth as Cogmind approaches the surface, even basic stats like slots, max core integrity, and heat generation would be gained as XP-earned upgrades. But this being “RPG-like,” we definitely need more stats to modify on level up…

Types

I started with a broader and longer list of factors the player could theoretically be given control over as they leveled, but pared it back to below 26 because I wanted them all to fit in a single window, visible without scrolling, while still being entirely accessible via letter keys. (This is yet another of the many cases in which Cogmind’s design is guided by UI restrictions, rather than prioritizing content over ease-of-use, but that’s honestly the best way to go about it because there’s plenty of design space within even much tighter restrictions, so usability should generally be the priority.)

cogmind_source_rpglikeUpgradeTypes_enum

The internal enum listing all valid upgrade types.

Notice that many of these upgrades overlap with existing item effects, at least in part if not entirely. This honestly isn’t an ideal way to build this mode, which would benefit more from having every single upgrade provide or improve a unique ability unable to be acquired via any other means. But the better alternative would be a huge undertaking, whereas basing upgrades on existing systems and code is fairly quick by comparison--altogether it took a couple days to build the upgrade UI and get it hooked in with the game’s data that it could modify.

Having some overlap does, however, enable the player’s progression strategy to emphasize one of flexibility (more slots, like regular Cogmind which is maximum flexibility) or safety/consistency (using permanent upgrades), especially in cases where the functionality they’re after can come from either a part or upgrade. Upgrades are naturally also the more accessible of the two options, since they only require XP and can be obtained at any point, rather than finding the relevant part (and better versions of it later).

You can actually graph when it’s more effective to have a part for a given effect vs. the upgrade, to a certain extent, weighing the cost of the upgrade vs. the cost of evolving the required slot, but the calculations change over time depending on the necessary part’s precise effect, and how many slots the build already has, since the latter get increasingly expensive. Trying to optimize these decisions can be complicated yet further by additional requirements in some cases. For example increasing raw energy generation is a simple straightforward way to get more power, but power sources can do the same thing and also come with more storage capacity for surplus energy, though also produce heat, require additional mass support, and occupy an additional power slot (yet another upgrade).

Relative costs are clearly the most important balancing factor here.

Costs

XP is used to increment upgrades, and each has a base cost, a modifier (a static value for the amount of stat increase per upgrade), and a cost modifier (a static value for the amount of increase in cost for each additional time an upgrade is incremented). For example, the first upgrade to sight range costs 100, increases by 1 per upgrade, and each upgrade after the first adds 200 to the cost (e.g. 300 to upgrade it a second time).

cogmind_rpglike_upgrade_costs_graph_sight_range

RPGLIKE cost upgrade graph for sight range. (Cogmind’s base sight range is 16, so its first upgrade brings it to 17.)

The result of this system is a linear increasing cost for repeated upgrades, essentially adding to the cost of specialization. 1,500 is the amount of XP available to spend at each new level raised, so according to the graph the 8th sight range upgrade, from 23 to 24, requires an entire level’s worth of experience! At that point (or even before) it’s probably more cost effective to add another utility slot and attach a part that extends sight range, depending on how expensive utility slots are getting :)

As for where the raw numbers for different upgrade costs came from, I wanted to start with a base cost of 500 for a single first slot upgrade, and use that as the basis for all other costs. This makes sense since slots are central to Cogmind’s balance to begin with. The particular value of 500 also 1) gave enough room below it to fit the other lesser upgrade base costs and 2) wasn’t too long in terms of digits (even after the intended increase in costs over time) to mess with the planned upgrade UI layout. As usual, before starting any of this I’d already mocked up the UI:

cogmind_rpglike_upgrades_ui_mockup_wip

Early WIP mockup of the RPGLIKE mode upgrade menu (incomplete). Created with REXPaint.

To be sure relative costs were about right without needing much actual playtesting, I built a spreadsheet in which I could drop in different base values, cost increments, and stat modifiers to see how they would affect the progression and player abilities at each level, especially in comparison to other upgrades.

cogmind_rpglike_upgade_costs_design

Interactive chart for testing relative upgrade costs in RPGLIKE mode. Variables go in the cells with colored (non-white/gray) backgrounds towards the left and everything else is calculated automatically, including some useful automated formatting to highlight various aspects.

Without an interactive chart something like this would take forever, and although I spent a good couple hours poring over these numbers, once it was done and I went in to actually playtest, very few changes were necessary afterward.

Inventory

One of the big questions early in the design was what to do about inventory capacity? Too large an inventory would be both boring and also doesn’t really contribute much since in RPGLIKE you don’t need to carry spare parts to combat attrition like you do in the regular mode--seeing as your parts won’t be destroyed, you just need a little space for the occasional consumable, or a handful of alternate parts for special situations.

Thus I decided it would be better to fold inventory capacity into the upgrade system and have each slot be very expensive, while starting with no capacity at all!

On the technical side, we already have the Pure Core challenge mode (no inventory allowed), which automatically converts any Storage Unit you step on into matter, but that was more of a janky solution which feels weird for the more “serious” tone I wanted to retain for RPGLIKE, since it’s obviously not realistic and you can still see Storage Units as parts, and on other bots which use them.

For RPGLIKE I went a step further and made it so that Storage Units essentially don’t exist. On startup, all robots equipped with Storage Units have them removed and their base inventory capacity is increased by a corresponding amount, changing the underlying game data in the process. Then of course I had to make sure it still wasn’t possible to get them via other means, like through fabricators, schematic hacks, or any kind of random spawning, and at first that seemed like it was going to take ages considering all the possibilities…

Then I remembered I could just use an existing “item distribution” setting and automatically convert all storage parts to “unique parts that can only be placed manually by the game”, as if they belong to the ranks of very high-rating special gear, and just like that they won’t be accessible through any other means :)

Of course this approach cannot handle cases in which Storage Units are actually manually added to the map via prefabs, so for those I fell back on the Pure Core method and just convert them all to matter, which is fine because the player will never actually see them as Storage Units to begin with.

With such low inventory sizes, Relay Couplers were also given special consideration. Builds focused more heavily on bothacking will want to carry spare couplers, but even at the high end inventory sizes in RPGLIKE are generally going to be only between maybe a quarter to a third of what you normally might have, so all Relay Couplers have their value doubled.

Caps

I prefer to avoid capping upgrades if possible, but there are some upgrades which would simply be too powerful without some kind of limitation. Technically we can enforce a more “natural” limitation by having those particular upgade costs scale very quickly, but because I decided to have costs scale linearly, trying to put later levels out of range would also put even earlier/mid-level upgrades out of range, so that approach wouldn’t work as well.

Instead I had to put an artificial cap on those upgrades which would be far too powerful if players focused on them, namely damage resistances and damage modifiers.

cogmind_rpglike_upgrade_cap

Example of upgrade caps in action.

Progression

“XP” for applying towards upgrades is made available in chunks, one per level, where each level raised both requires and provides 1,500 XP.

Because I decided to have earned XP translate directly to the value used for upgrading (i.e. there’s no additional/separate unit of value awarded at each level to use for upgrading), and upgrade costs increase with specialization, thus it makes the most sense for the amount of XP per level to remain static. Yes we lose the option of having inflationary XP-per-level thresholds often seen in RPGs, but it keeps things simpler both on the inside and outside :)

cogmind_rpglike_leveling_xp_thresholds

Target approximate XP gains per depth, with corresponding values.

The total XP target for each depth comes in handy for balancing costs and XP gains. To make sure the numbers would work out, I put together a separate “build theory” table with some sample slot arrangements likely for a given depth in a regular (non-RPGLIKE) game, and had it automatically tally what this build would cost in terms of XP:

cogmind_rpglike_leveling_build_theory_costs

Build theory calculation table, as used for balancing RPGLIKE mode.

Because basics like core integrity increases and minimal heat dissipation would no longer be included as benefits of Cogmind’s natural evolution, I also tallied the total cost including those corresponding upgrades (including also base inventory capacity) to arrive at the true XP cost of a regular build. By comparing the total XP cost to what a player would likely/hopefully have at a certain depth, and taking into account the cost of optional upgrades, I could see how much leeway there would be for builds compared to the regular mode and adjust for a desirable progression and power level that way.

Sources of XP

The latest April Fools mode, “Pay2Buy,” had a system one might liken to XP in the form of earning CogCoins for purchasing parts from the store. It was based entirely on accumulating alert, since alert in Cogmind already translates to difficulty, by design, so the more trouble you cause, the more you earn, and therefore the more you also have to deal with the consequences of your actions.

For RPGLIKE I wanted to use that same system, relying on alert increases to award XP, but because this was to be more than a little temporary event, the system needed to allow for a greater variety of play styles, and therefore required a somewhat wider variety of XP sources.

I thought of possibly adding very explicit sources of XP unique to RPGLIKE, such as certain enemies or special locations, but again, variety is better here and my eventual conclusion according to my notes was that “XP needs to be from whatever actions we want to incentivize, so it should really be a combination of things.”

So in addition to alert, which already encompasses a range of actions that tie into creating mayhem, I also decided to award XP for all sources of bonus points. Most of these resemble “XP bonuses” you might find in an RPG for plot-related encounters, and also tie into ally-caused destruction, allowing allies to help you earn XP as well just like they help raise your score (important especially for those builds/runs that frequently rely on help from allies).

But the largest single contributor to XP, or at least on par with alert-sourced XP for combat builds, is actually a separate category: Exploration. One of the defining factors of regular Cogmind progression is that your core improvements come from “evolution” automatically as you approach the surface, meaning you don’t have to grind out levels or worry about accomplishing specific tasks to remain effective. This leaves a lot more room for freedom to try a huge range of play styles, so I decided that exploration is far too important to pass up as a source of XP, since anything else would end up limiting creativity.

Simply visiting different maps gives significant XP rewards, where main maps are worth an entire level’s worth of XP, while the value of branch maps varies, but is always at least a third of that for each map. A few special (or especially dangerous) maps are even worth more than one level.

After playtesting with it I was very happy with the result, and from sample runs I’ve seen by other players in RPGLIKE mode so far, regardless of style their progression tends to be at least somewhat close to the intended targets outlined above.

Level Curve

That observation can also be explained by a built-in XP adjustment that tries to maintain a tighter “level curve.” (Level progression itself is indeed linear, although if we graphed the XP levels reached by different players at a given depth it would of course result in a curve.)

To keep players from getting too far ahead of the curve, diminishing returns on XP gains are applied beyond a certain point (specifically the “target max level” for a given depth). It’s not a huge immediate falloff, and one can still get some levels ahead, but the returns do get smaller and smaller until hanging around on the same map farming alert for XP is really not worth it, not when you can head up to the next depth and earn those same levels much more easily.

I also wanted to prevent some players from falling behind the curve, but decided this wasn’t necessary in Rogue mode (the hardest difficulty setting), so in Adventurer and Explorer difficulties the reverse of the diminishing XP formula is applied to XP gains by players who are below the minimum target level, allowing them to more easily catch up if they’ve somehow fallen too far behind.

(Here I’d like to share some sample graphs of level curves from our data, but sadly although the data has been collected, the leaderboard system to access it has not yet been completed…)

Timing

The upgrade menu is accessible at any time.

I originally thought of doing upgrades during Cogmind’s normal evolution process, but realized 1) this would require two new UI windows and be more complicated to implement and 2) was clearly thinking too much “inside the Cogmind box.” I mean it should be like most CRPGs where you can get your new goodies at any time, right? :)

So in RPGLIKE, whenever a new level is hit there’s a notification and the menu is always right there. XP can even be saved for later, accumulated for an upgrade that’s become too expensive for a single level, or for other strategic purposes.

Starting Conditions

Naturally for a mode as different as this, it makes sense to have unique starting conditions. It’s also an opportunity to add a bit of CRPG-like “character generation” right from the start.

Players start with a chunk of initial XP (more for lower difficulties) that can be spent immediately on upgrades to start defining their build. The base amount in Rogue mode is set at just enough to create what is more or less a normal starting loadout:

cogmind_rpglike_upgrades_regular_start

A Rogue mode RPGLIKE start with upgrades defining a standard starting build (7 slots + 4 inventory), minus one inventory slot since they’re quite expensive in this mode but also not nearly as important.

Starting core integrity is higher than usual, since that’s what takes the brunt of attacks instead of parts, unlike the normal game.

The base starting build before any upgrades is only 4 slots! This is the first time a Cogmind build has the option to only ever rely on a single Propulsion/Utility/Weapon slot. (Because I was curious and wanted to try it out, I actually did a complete 4-slot, upgrade-only, run recently :P)

There’s also no inventory capacity by default, but again it’s not as important in this mode, so most people will/should start with fewer than 3 upgrades there and reallocate the significant XP savings elsewhere on multiple cheaper but effective upgades.

UI

The upgrades UI appears in the same location that Pay2Buy did, and resembles it in some ways, but because the latter’s expanded form actually made use of a generic list class that I built for use throughout Cogmind, while the upgrading would require many more unique interactive features, I had to write this new one from scratch. No problem, I do rather enjoy designing and building interfaces :D

First, because it could be easy to miss the fact that you’ve raised a level in the first place, especially because it often happens when other things are going on, aside from the inevitable message log event there’s also extra feedback in the form of a unique sound effect and blinking indicator above the level/XP summary. I don’t want any of Cogmind’s notifications to be modal or anything quite so interrupting/in-your-face/immersion-breaking, so that’s as far as I went.

cogmind_rpglike_raised_level

Demo of raising a level and assigning a few upgrades with the mouse.

As usual I always want everything to be fully accessible via both mouse and keyboard, and in the case of the latter there are even three different input schemes. The standard Cogmind approach is of course lower/upper case characters for increasing/decreasing their respective values. Also with lists like these it’s nice to be able to navigate directionally, so both arrow keys and numpad can be used to move the selector up and down, with left and right incrementing and decrementing the current value.

cogmind_rpglike_selecting_upgrades_keyboard

Demo of pure keyboard control in the RPGLIKE upgrades interface.

As you can see references for key commands are built into the interface itself, making them easy to learn. The “Up/Down/Left/Right” in the corner isn’t really attached to anything, but players will generally intuit that it refers to key commands and try them out, seeing the effect it has on the UI.

Probably the biggest challenge with a UI like this is that upgrades cannot actually be applied until confirmed, but before that point it’s still necessary to show their state, modified cost, limits, etc. given the desired upgrade(s). This can get somewhat complicated, and also potentially require a fair amount of duplicated code for various purposes.

In the end I used a solution that simply retrieves direct memory references for respective stat values, which can be used to both query the current base value (and temporarily modify it as necessary) as well as apply each modification later once confirmed. The amount of code involved ended up being quite small, but could have been larger if the upgrades were more complicated than simple integers (and integers where positive values are always good, at that!). I did actually remove one planned upgrade partway through implementation because it would break the elegance of this system :P

Classes

Character classes are a staple feature of most RPGs, but at odds with Cogmind’s normal free-form build-as-you-go approach. This being “RPGLIKE” mode, it sure would be nice to fit classes in there somewhere…

Fortunately Cogmind already had a built-in feature that would help here: the automated build classification recently added with Beta 9. It analyzes your current build and assigns it a base class name with maybe a special modifier, but must be activated manually (doesn’t appear by default) because that particular feature didn’t really fit with the type of immersive atmosphere I wanted to create for Cogmind. Regardless, it’s certainly appropriate for a mode like this, so I made it active despite whatever the advanced config file says. A fair number of people who didn’t know about it before will probably even think it’s unique to RPGLIKE :P

cogmind_build_classification_test3

Sample “Skirmisher” class, a combat bot supported by infowar utilities. Se more samples and a breakdown of how the system works in Building the Ultimate Roguelike Morgue File, Part 3: Mid-run Stat Dumps, under “Build Categorization.”

The classification system does take into account the effects of RPGLIKE upgrades when deciding on a class, which took a while to merge with the classification system and wasn’t even present in the earliest prereleases since I wasn’t sure I’d have enough time to get around to it, but I’m glad I did because I think it’s pretty important for accuracy purposes given that many of the upgrades would be taking the place of various slots/parts.

cogmind_dominant_class_samples

Compound class types from a Cogmind run as they appeared in the Dominant Class section of the scoresheet.

“Healing”

Exactly how to restore core integrity would be a pretty central point of RPGLIKE gameplay, but I still hadn’t even figured out how it would work while already building the UI and setting upgrade costs. Since the first “purely RPG” ideas like resting-to-recovery or gradual recovery couldn’t really work balance-wise in Cogmind, it seemed I’d have to wait for a better solution to pop up, and at least there’d be spare time in between working on the other features to mull over different possibilities.

Healing over time would have clearly been boring in so many ways, not unlike it can be in some other roguelikes! But at least these other roguelikes are specifically designed around individual encounters, where you’re often at full capabilities for each one and when you go into a given battle, it’s you vs. that current enemy/enemies which you’ll probably either squash or which might have a chance to kill you if you make too many mistakes (maybe even just one mistake xD).

Cogmind has always been more about attrition and tactics vs. a much larger complex and numerous potential enemies, which individually don’t really pose a threat to you. So that whole central aspect of the game (and all the content and balancing associated with it) would have to change for rest/gradual-healing to be feasible, and as I mentioned earlier that’s outside the scope of this mode, and also unnecessary anyway since there are other methods.

Another problem particular to healing over time is that Cogmind doesn’t have the consumables most other roguelikes do in order to handle short-term variance, consumables like… health potions! It’s from here that I started taking a new approach to the idea of integrity restoration, and realized we’d need a whole new item to do it.

Protomatter!

Thus Protomatter was born, a whole new item permanently added to the game for a special mode, and in that sense the first of its kind. (One other event, the holiday mode from 2018, also added items, but that mode no longer exists so neither do the items associated with it.)

Protomatter is basically like a health potion, dropped randomly by some combat-capable enemies instead of regular Matter, and used to restore core integrity (or if one’s core is already maxed, it repairs any damaged parts).

I definitely didn’t want it to be like health potions in other CRPGs where you can simply chug them when in danger for an instant boost of HP, possibly even up to full. Having it take time to use would be more appropriate for Cogmind, and add a bit to the tactical decision of when and where to use it.

The original implementation (that patrons tried out in the first prerelease) was simpler but quite funny: It determined how much of the Protomatter was required for a full heal (or to use all of it even if not enough for a full heal), then calculated the required number of turns to do that, and applied it all as a single uninterruptible action. That was by far the easiest way for me to implement it rather than spreading its use over multiple turns, but the way the numbers worked out this meant you could in some cases end up sitting there applying Protomatter for 15 or more turns! One can imagine the potential consequences of such a long action--enemies you didn’t even know were there yet might round a corner and start shooting you to pieces :P

Instead I ended up having to take the more complicated route and have it apply on a turn-by-turn basis, with pacing determined by the player who could simply wait while standing on top of it in order to apply the next batch. Some of the complexity came from the application process itself (mainly where it involved attached parts), but also simply from properly handling the messaging system so it would show the desirable results once you’d finally finished applying Protomatter, rather than spamming the message log with too many individual messages.

At first I wasn’t sure what to call this item, but it soon became obvious it should be related to Matter because:

  • Protomatter would similarly be a pretty fundamental item throughout a run
  • Protomatter would sometimes be dropped as salvage (instead of regular Matter) (note that to avoid destabilizing the existing balance, all Matter drops were increased a bit as well)
  • Like Matter, it’s affected by salvage-modifying attacks (although unlike Matter it can never have its amount increased by a positive net salvage modifier)
  • I would need a tile for this new item, and the Matter tile would be a good choice here since it’s otherwise only used once and doesn’t fall into any other category
cogmind_rpglike_protomatter_drop

An enemy Programmer dropping salvageable Protomatter instead of regular Matter.

At the same time, I wanted to also differentiate it from matter because it not only has a different purpose but would also have different fundamental behavior, so I gave it a unique naming scheme, “Protomatter-XX” (e.g. Protomatter-56, where 56 is its remaining amount).

Protomatter behaviors that differ from Matter:

  • Can be picked up as an item and held in inventory (not in containers like Matter), important for allowing some backup repairs depending on how much inventory capacity you have and want to devote to this purpose.
  • Suddenly decays randomly, disappearing from the map (unless in inventory or currently under the player), as it’s important to prevent stockpiling Protomatter on the map itself, since in the right hands that just makes it easier to become invincible.
  • Cannot be merged or stacked, because that would also make it too easy to stockpile unless some kind of arbitrary limits were put in place, but may as well do with that altogether since it just unnecessarily complicates things.

On the topic of naming, the first options considered for a moment then thrown out were to just jokingly call these Health Potions, but even though it would be really in theme for this event, RPGLIKE is meant to be a more serious mode so I had to come up with something better. “HP Kit” or “HP Unit” were similarly passed over :P

cogmind_rpglike_protomatter_info

Protomatter info.

Damage Transfer

While working on the new “healing” mechanics, I decided this was an opportunity to change the initial idea that all incoming damage would go straight to your core, practically doing away with item destruction entirely and behaving more like your average roguelike with RPG-like progression.

Reducing the role of item destruction is definitely one of RPGLIKE’s primary goals, but completely removing the risk of that happening felt like it would unnecessarily gut a lot of the feeling of Cogmind--your parts always appearing in perfect shape would be fairly awkward, and we can get the anti-item destruction effect without going to that extreme, by just redirecting most of the part damage to the core, instead of every last bit. This also helps retain some of the coverage-related balance inherent in Cogmind’s part stats (there is definitely noticeable destabilization, however--that’s unavoidable).

So 80% of damage to parts goes instead to the core (it’s funny because there’s actually a part in the regular game which has this exact effect, although naturally the strategic implications are quite different there due to the lack of frequent core restoration). Even though it seems you don’t really lose many (or any!) parts in this mode, it still feels more natural if they’re taking a bit of damage from attacks, and it could still come into play if you’re playing very poorly or incorrectly managing Protomatter reserves and acquisition.

Honestly I think we could probably do with a lower percentage than 80, at least for Rogue mode, and it would make RPGLIKE more challenging while still retaining its uniqueness., but that’s a slippery slope that leads right back to the default Cogmind experience ;)

While on the subject of healing, I should mention that several times I considered allowing XP to be used to repair current core integrity as separate from the current/max integrity increase that it ended up as, but ultimately decided against allowing that since upgrades were meant to be instantaneous and that would be just like the “emergency chugging of potions” I was trying to avoid.

Records

As a more permanent official mode recommended for some players, RPGLIKE also got exclusive treatment as far as the scoresheet is concerned.

The history log records slot upgrades (since they’d normally be reflected in evolution messages but those won’t happen in this mode), as well as each level gained (since that aspect of progression is pretty important to the mode and can be interesting to see in the context of other events along with the turn counter).

cogmind_rpglike_history_log_excerpt

Excerpt from an RPGLIKE run scoresheet’s history log, showing level raising and slot upgrades.

RPGLIKE also gets its own section in the scoresheet, recording many other details on a per-map basis.

cogmind_rpglike_scoresheet_section

Sample of a dedicated RPGLIKE scoresheet section.

What’s Next?

Could RPGLIKE mode be better? Yes, in many ways! I mean this is no surprise given that it’s a mode designed on top of another game and basically turns it on its head :P

I do plan to still do some more work on RPGLIKE mode, or at least tweak it. Precisely how to improve it also really depends on the goal of doing so, since what constitutes an “improvement” is subjective, and in its current form it’s most definitely not the primary way I would want to play Cogmind.

I mean I’ve been having a lot of fun with it, as you can see from the already several streams I did in this mode:

  • RPGLIKE Intro Run -- An introduction to the new mode plus a relatively quick but complete run based around one of the overpowered EX-tech parts I’d never used before (spoiler: we torch 0b10)
  • RPGLIKE No-crutches Run w/Kinetics -- No FarCom, no RIF, no imprinting. Just a pure kinetic combat build out to shoot anything that gets in its way.
  • RPGLIKE 4-slot limit “Babymind” run -- No slot upgrades allowed, just 4 slots total straight to the end. We go mostly melee, a bit of hacking, and using allies to do much of the fighting. (Several big guys fight on our side because FLK :D)

An introduction to the new mode plus a relatively quick but complete run based around one of the overpowered EX-tech parts I’d never used before (spoiler: we torch 0b10)

But it’s far too easy. For the first iteration this was intentional though--I guided it towards the easy side for a couple reasons:

  • It’s a holiday event! For something like this it’s better to aim for fun over anything else. After all, it’s optional and not like it removes the regular mode, anyway.
  • In games there’s often a fine line between too easy and too hard when you have a healing system, certainly much finer than Cogmind’s usual death by attrition and an accumulation of long-term mistakes rather than one or two recent mistakes. Designing a healing system that can ride that line more closely would take a lot more theorizing and playtesting than there was time for. Heck it might even be impossible given Cogmind’s other mechanics.

My personal main goal for RPGLIKE’s theme was to add a system of permanent progression and all but eliminate part destruction, and it satisfied those goals well. It will never be heavily balanced like the regular game--that would require too many changes, but it’s still fun either way, and at least the challenge level can be tweaked. Those who enjoy this mode aren’t necessarily looking for complete balance anyway, at least it doesn’t sound that way from all the feedback :)

Bonus: RPGLIKE Strategy Notes

While playtesting RPGLIKE I was noting down various strategies and/or observations for later reference:

  • It seems to get easier over time, as is generally the case with other “RPG-like” roguelikes but quite the opposite of regular Cogmind (which tends to get harder as you progress)
  • That said, you also gain levels very quickly at the start (plus have extra XP to spend on upgrades you normally wouldn’t have) and as long as you can ensure you don’t destroy most of the Protomatter out there, it’s unlikely you’ll actually die.
  • Either way, you generally feel a lot more free to be reckless because damage can generally be repaired, and mistakes aren’t going to be as costly in the long run like they normally are.
  • Inventory capacity is going to be low throughout the run, but that’s okay because you don’t need spares. It becomes more of a simple storage for items needed in alternative situations, or even consumables (“health potion” Protomatter, and in one of my runs I had a PSU Rigger so I just kept filling my limited inventory space with nothing rigged power sources :P)
  • Can use more/different types of items you might not otherwise normally keep attached, since they won’t break! This is especially useful for unique parts that cannot normally be replaced.
  • There’s little reason to use anything slower than hover unless you want siege mode or other tread benefits, because propulsion is much more protected in this mode anyway, and even mass support can be gained via upgrading.
  • Repairing core and parts is separate, and core is often more important, so it can be advantageous to save your Protomatter specifically to repair core rather than worrying about parts, which can be replaced, after all. However if you’ve upgraded core integrity quite a lot and then lost much of it, getting enough Protomatter to repair both core and parts can become difficulty, putting attached unique parts at risk.
  • Because you generally have few to no spare parts (since you don’t normally need them, or can’t spare any inventory space), cave-ins are extremely dangerous, even more so than usual. To a lesser extent the same goes for other effects that remove and/or directly damage parts such as Blade Traps, Saboteurs, etc). The most dangerous effects are technically avoidable, though.
  • Honestly in it’s release state it’s kinda like a wizard mode for testing the effectiveness of builds, at least in an offensive capacity, since you can try them in different scenarios without fear of inevitably losing them after a period.
  • Can save XP for later when you really need it, either to buff some ability that will be of immediate use, or to increase core integrity in a pinch.

Some of these may no longer quite be as applicable after updates, but they’re relevant as far as the Winter 2019 event goes ;)

Addendum: Beta 9.4 Updates

Not long after this article went up I released Beta 9.4, mainly as an update for RPGLIKE mode. It didn’t involved any sweeping changes, and you can read about some of its other tweaks in the linked release notes, but here I did want to at least mention that the role of armor-type parts as protective gear was restored for Cogmind.

The solution was to simply have armor absorb more damage than usual (40% instead of 80%), turning it into a sort of consumable in the RPGLIKE world of otherwise far less consumable parts. This means builds can use armor as a way to avoid the need to rely on acquiring as much Protomatter.

Further changes will contingent on the size of RPGLIKE’s post-event player base and the data we see from these runs.

Posted in Design | Tagged , , | Leave a comment