Official development blog

Special Mode Design, Polymind Part 2: Players, Stats, and the Future

Last time in part 1 I covered everything leading up to Cogmind’s Winter 2022/Polymind event, so architecture, UX design, balance, multitile robot considerations etc. Now let’s take a look at the aftermath!

After Polymind was finally released and I could take a breather, I had a lot of fun seeing other players dive into it, reflected both in what’s been shared on the Discord server and also simply by checking out scoresheet uploads since those include new information specific to the event mode.

Cogmind Polymind Scoresheet Map Excerpt w/Annotations by Captain Croissandwich

It’s especially funny seeing Cogmind in the scoresheet’s final map summary represented by a character other than ‘@’, as seen here in an image shared by Captain Croissandwich who is just around the corner from the exit/win after having already opened the door, as a ‘u’ (Builder/Engineer)… kinda surrounded by unfriendly bots that had clearly become too suspicious!

Any time new play styles are introduced, there’s always a good bit of activity in the community since figuring out a new meta in an otherwise familiar world is an interesting exercise for fans. Polymind being a pretty extreme departure from normal Cogmind, there’s a lot to figure out.

My hope was that players would find creative new solutions to challenges, or at least fun aspects to toy with while setting their own unique goals besides simply winning.

Some strategies are obvious, as intended, such as preferring to take control of allies since their cost is always much lower (generally by 66%, though there are exceptions), and others are more indirect, such as obtaining robot schematics and fabricating desirable allies to then control.

The great thing about combat-capable allies is that later releasing control doesn’t result in having an angry hostile right next to you. Combat-capable hosts are useful, even required sometimes because they’re more resilient while also being the primary method of obtaining more Protomatter, but as aptly described by players there is a “riding the tiger” aspect to trying to leave a hostile one behind once you’re in control. You’ll likely want to get their weapons shot off first, or have some other plan.

Players also came up with the interesting strategy of using Repair Stations to remove unwanted parts from your host, since unlike Cogmind, hosts are not capable of reattaching the repaired parts themselves.

NPCs are commonly desired hosts, generally expensive but also relatively powerful compared to most common Complex 0b10 bots. Strategically speaking, the main goal of taking a combat host is to eventually end up with more Protomatter than you spent on it in the first place, so we’re back to the importance of those cost numbers, and no doubt more fine tuning is called for.

On that note one particularly strong strategy is “Tracker chaining,” or intentionally getting what are normally dangerous enemies sent after you, specifically with the intent to take control of them and use them to fight their friends--rinse and repeat as you progress. In a later update I had to significantly up their cost because Trackers are a special robot outside the normal build balancing rules, at least insofar as our integrity and core exposure variables do not reflect what they’re really capable of. Even after the increase they’re still good, though somewhat more balanced.

One of the most interesting discoveries, made by CaptainWinky, takes advantage of a Mechanic host’s repair abilities to build robot friends! Normally Mechanics use a collection of Backup parts from their inventory to restore basic functionality to robots that have lost their power/propulsion/weapons, and I had assumed that when fitting replacements they search for the appropriate Backup-named part, but no… The assumption is that their inventory would never contain anything other than Backup parts, so the code actually just checks for any available inventory parts that match the desired target slot (a faster check). You can see where this is going :P

Cogmind Polymind Allied Grunt w/Powerful Parts (fitted via Mechanic host)

A regular controllable grunt with very powerful gear xD (screenshot by CaptainWinky while testing the concept in wizard mode)

Since they’re not limited to Backup-series parts, with a Mechanic host you can gather other parts and “repair” your allies with a different loadout. Totally didn’t expect that, but it’s great.

In practice it’s probably hard to take advantage of since it’s a repair functionality after all, one that can’t be used unless the ally in question has an empty slot after taking damage. Other robots are not usually very resilient, so by then their core will often already be damaged as well, after which even with new parts they’ll probably end up dying quickly anyway. It might come in handy later on with stronger robots, or in specific situations. You also can’t fit any utilities to a robot, since that’s not a category of parts they replace with Backups (although this specific discovery honestly has me thinking about adding something that would slot in as a Backup utility).

Stats!

Now that the event has come to an end, the Polymind leaderboards have reached their final state, and it’s time to review the run data and pick out some stats for closer examination!

Cogmind Polymind Leaderboards (final)

Final Polymind leaderboards.

I tacked a couple extra days onto the end of the leaderboard cutoff past when the Polymind autoactivation period ended (through January 7th) so that anyone who had started a run near the end had some time to finish it and still be included. That means the official event ran for about 16 days, though other runs outside that period (and any additional lower-scoring runs for each player) can of course be found in the complete Beta 11.2 run database.

During this period, a total of 786 Cogmind runs were submitted, 328 (41.7%) of which were something other than Polymind. In a majority of cases those other runs were new players who didn’t yet qualify to have the mode start automatically, the remainder being anyone who deactivated it manually (didn’t want to participate) or playing some other special mode (launching any new event tends to bring attention to past events).

The data we’re looking at here is for the 457 Polymind runs (58.1% of the total) submitted by 113 unique players. That’s an average of 4 runs per participant. Polymind run counts per player ranged from 1 to 20, but most people played through at least a few runs. (Reminder: Cogmind run data is opt-in, so we don’t have any info for those who are not submitting scores.)

There were a total of 14 Polymind wins by 10 unique players, including two extended wins (both by aoemica). All winning runs except for one took less than three hours, and most were about 1~2 hours, so as reported Polymind runs do tend to be faster than regular Cogmind (see the Beta 10 stat summary for a graph of Win Count by Hours). The reduced length comes mainly because you have few significant incentives to take detours and collect branch rewards, or even seek out specific items--it’s simply a matter of survival to the end through a process of controlling other bots while gaining enough Protomatter to maintain that momentum.

Total play hours for this data set clocked in at 276 hours, so about twice what I spent on it. Not a great ratio, but then not surprising since I mostly work to serve a smaller number of long-term players at this point, and as I’ll write a bit about later, some of the work could impact the main game itself and gain more longevity that way. Plus of course some people will still play Polymind in the future.

Polymind Classes

One of the more fun bits of Polymind data which I was eager to examine is the class distribution list, since unlike the normal behavior which derives player build types from their current loadout, here we could instead use it to see what classes of bots they’re preferring to control (I had the system switch to simply reporting the current host class).

Among those runs with a Dominant Class of “Cogmind,” meaning their most common state was running around naked with no host at all, the majority were understandably limited to the early game (first few depths). 38% of Cogmind-dominant runs, however, reported making it to the mid- or late-game (none won), with half of those also naked for the majority of the entire run.

Of course most Polyminds spent their time in control of hosts, as expected, averaging 4 different classes of host throughout their run.

The record-holder for greatest number of unique classes controlled in a single run is CaptainWinky, whose list includes 11 different classes (making it onto the list requires spending at least 3% of the run using a given class):

Cogmind Polymind Scoresheet (Captain Winky): Class Distribution

CaptainWinky controlled a Sentry-class robot for 24% of their run, but also controlled hosts of 10 other types.

The number of unique host classes ranged from 3 to 9 among winning runs, so generally above average. Actually, the only winning run with a below-average dominant class count was my own--only three! During that run (being my first) I tried out a number of other classes, but not for a significant enough chunk of relative time to be included in the list.

Cogmind Polymind Scoresheet (Kyzrati): Class Distribution

Class distribution for my Polymind win.

As you can see I’m a fan of Heavies and their devastating firepower and just all around buff part-covered builds (plus they can rest off their suspicion at guard points!).

Despite my high 62% preference for Heavies, among winning runs that one actually ranks behind another for emphasis on a single host: LILY’s dominant class was Programmer, at 67%!

Cogmind Polymind Stats: Dominant Classes (winning runs)

Dominant class for each of Polymind’s winning runs, ranked by how dominant it really was throughout that run.

Here I should mention that I’m not differentiating difficulty modes for the purpose of Polymind data analysis. LILY had the only non-Rogue run among the wins, one of 76 (16.6% of the total).

To give some of the data coming out of these lists proper context, we’ll also have to explain one of the quirks of the class system: While players are certainly familiar with common Grunts, Sentries, and whatnot, some may not be aware that there are other special robots also categorized as those same classes. For example, some runs may show a high percentage of Swarmer hosts, like KTG-v3’s win spent 48% as a Swarmer! Examining the history log from that run we can see they indeed must have controlled common Swarmers for numerous maps before finally switching to the one and only Tracker (a special, more powerful, type of Swarmer) they eventually controlled in Research.

Cogmind Polymind Scoresheet: History Log w/Special Host

KTG-v3 takes control of a Tracker in Research. Before this, seven of the maps they traversed using common Swarmers.

So the history log provides more color as to what kinds of special hosts each player controlled, as does the event-specific “host kill count leaderboard,” both of which record the specific variant or name of the host. It is there that we can examine hosts of particular interest.

122 (26.7%) Polyminds controlled at least one unique special host, with about half of those controlling more than one. youngster controlled the largest variety of special hosts, eight in all, in a run that eventually went on to win.

By far the most popular special host to control was EX-DEC, an Exile that could be met early and controlled for relatively cheap, considering the formula-based Protomatter costs. EX-DEC is not normally a combat bot, but does carry a decently powerful autonomous weapon that allows them to move and shoot at the same time.

Cogmind Polymind Stats: Special Hosts Controlled (all runs)

Special hosts ranked by total times controlled across all Polymind runs.

The Tracker is up there, too, being quite cheap for a good while (that formula again…) until I significantly increased it manually in a later update (though still plenty worth it considering how powerful they are). Beasts make sense at #3 as one of the earliest ways to have some fun with a destructive multitile robot. The next two, Strikers and Executioners, along with many others on this list are clearly from Warlord-related events where these combat bots are either cheap (allied) or at least plentiful and effective. Many of the rest are various NPCs, since almost nothing was off limits for control, and NPCs often have decent loadouts.

The full mapwise Dominant Class list that goes along with these can be even more interesting, in order to see which stretches of the world, and for how long, players used them, but that data contains much bigger spoilers so I’ll leave that off here. You can always check out other Polymind stats on your own by examining the raw Beta 11.2 run data to see more (sort by Mode to more easily find all Polymind runs).

Polymind-specific Scoring

Some bigger Cogmind events come with their own dedicated section in the scoresheet for recording event-specific data, and for Polymind there we’ll find some other entries besides the host kill leaderboard.

Cogmind Polymind Scoresheet: Polymind Data Sample

A sample Polymind scoresheet’s data section.

Among the Polymind-specific scoresheet data, we have the Top 5 Hosts by Kills per run, where it’s interesting to pick out the most destructive individual hosts among winning runs. Captain Winky led in this category by far, having managed to take control of 8R-AWN, by far the most powerful early target but also very expensive for that depth, hence only being used twice during the event.

Cogmind Polymind Stats: Top Deadly Hosts Ranked by Kills (w/player) (wins only)

Polymind’s ten most deadly hosts (and their controlling player) among winning runs.

The kill records get even higher if we include all runs, even those that did not ascend:

Cogmind Polymind Stats: Top 10 Hosts by Kills (all runs)

Top 10 individual Polymind hosts by kills, across all runs.

Captain Winky is still up there, in fact the only one on both lists. We can also see the only other 8R-AWN controller ;). And Perseus sure knows how to get the most out of a host!

Cogmind Polymind Scoresheets: Host Kill Leaderboard Samples

Here are some more samples of host leaderboards submitted in various scoresheets. Each ranks the best hosts by kill count, and where they were first controlled.

Note that during the first couple days of the event there were some issues with the host kill leaderboard system (fixed in one of the several patches), so technically a portion of the earlier runs may have failed to consider a few hosts for inclusion.

With a further fleshing out of the job system, it could also be interesting to tally a corresponding “unsuspicious leaderboard” ranking individual hosts by how much they contributed to lowering suspicion over their lifetime. This would allow us to see what kinds of hosts were being used for that purpose, and their relative effectiveness.

Classes Controlled tallies would be fun to examine over the long term if players were to continue doing many Polymind runs, but as an event there are only so many runs per player. This means the likelihood of optimal play is fairly low, as everyone is still experimenting with possibilities and learning what they can do with different hosts, making that stat less meaningful for aggregate analysis right now.

Robots Controlled data might hold some insights, especially looking at the percentage of new hosts at each depth which are combat-capable, although pulling those numbers from our data set in a meaningful way would be pretty challenging so I didn’t go that far…

Average host suspicion among winning runs was 64.2, lower than I expected! And among non-winning runs the average was 60.7, so not a significant difference. Some of the more interesting runs in this regard:

  • Thermalderp averaged only 26 suspicion, surviving 90% of the run as a Recycler and making it all the way to a -6 Garrison before being destroyed by a Grunt
  • Perseus spent 78% of one run as a Programmer and made it all the way to -1 with an average 32 suspicion
  • LILY and lyrabold tied for the lowest suspicion (40) among winning runs, the former also surviving 67% of the run as a Programmer, and lyrabold 58% Sentry.

Bonus Points

Outside the Polymind section, we also have a special bonus point entry simply called “Polymind Skill.” This value is a combination of multiple factors to reward players for being good polyminds, generally awarding points for behavior and achievements that are not normally sources of bonus points (or don’t even exist in the regular game).

At the high end Polymind Skill tended to contribute about 10-20k points to one’s final score, so often counts for a fairly significant chunk of that.

Cogmind Polymind Leaderboard Polymind Skill Percent

Top 20 Polymind leaderboard scores, along with the percentage of that score accounted for purely by the Polymind Skill bonus.

To compare, I also reranked the leaderboards by Polymind Skill to see what would come out of that:

Cogmind Polymind Leaderboards Re-ranked by Polymind Skill (Top 20)

Polymind leaderboards ranked by Polymind Skill (final Top 20 only).

Only a couple players swapped in/out of the Top 20 when switching metrics, so the effect was not significant in that regard, although it did enable a few players in the Top 20 to jump quite a few places.

I was thinking it might be fun to rank the final Polymind leaderboards using this method, but I would first want to further tweak the values and formulas used to generate the bonus, since all that was set based on theory, before Polymind had ever been played.

Perseus earned the highest Polymind Skill of any run (23176, 32% of their total score), and Captain Winky earned the highest among all wins (17933, 41% of total score).

aoemica had the only extended game wins, and while both of those runs had by far the lowest Polymind Skill as a percentage of score (both only 18%), that’s a more likely result as branches and extended game areas offer lots of alternative point sources to tip the balance in favor of non-Polymind scoring. As far as true play style goes, we could get more accurate readings by looking only at main maps, for example.

One of the preexisting bonus score components pairs especially well with Polymind: pacifism. Polymind’s capabilities of course lend itself to aiming for even more points (and survivability!) via the Pacifist bonus (the way it normally works is that you receive extra points for each new depth reached without having destroyed any robot on any previous floor, generally achieved by either avoiding enemies completely, running from them, or using alternative means of dispatching them). Polymind can fairly easily remain unsuspicious in the early floors, which are dense with cheaply controlled non-combat bots, and the data strongly reflects that: 44.4% of Polymind runs had at least some Pacifist bonus, quite high compared to a mere 4.5% in the regular game!

Looking at runs with the highest Pacifist bonus, we see a bunch of new names:

Cogmind Polymind Top 5 Runs by Pacifist Bonus

Top 5 Polymind runs by Pacifist bonus.

These players were particularly interested in remaining undetected, only sometimes controlling a combat bot such as a Sentry or Hunter to gather Protomatter for more sneaking around (eventually losing their pacifist streak at that point unless they had acquired Protomatter through other means). Above I only listed the primary class for their run, though they tended to control a good variety of classes across their run, at least 5~6 different types.

lcbb_tuk in particular had an interesting one, sticking with the same Watcher picked up in -10/Materials for the entire run. They were apparently attempting to speed run it with that Watcher, a decent choice due to their speed, evasion, and sensors, all in a single package, but eventually headed into the Upper Caves where they were chased down by a P-70 Sage.

Future of Polymind

Like most Cogmind events, Polymind will remain accessible in future versions of the game. (A list of all currently available modes, each with a summary and date when they were held, is avaiable in the manual.)

Seeing as I had already done quite a lot of work on Cogmind’s next version (Beta 12), and that version wasn’t yet itself ready for release, Polymind was developed as part of the public Beta 11.1 branch, and released as 11.2. (Patrons found it funny that when starting up their Beta 12 builds the date-based version notification system informed them that a “newer” version was available, even though Beta 12 has a lot more new stuff :P)

As a pretty big project, one that even included a few features we want back in the regular game as well (that new force melee toggle!), there’s a lot to import into the upcoming Beta 12. I normally don’t bother simultaneously working with multiple branches like this, but here it made sense.

Out of curiosity I checked just how much the code base expanded with the addition of Polymind and was surprised to see it clocked in at nearly 5k lines! Lines of code is of course a pretty bad metric, but it’s easy to calculate and fun to compare nonetheless, as long as the context and limitations are understood. Naturally we want to see how Polymind weighs up against Cogmind’s other special event versions :)

Cogmind Special Event Versions: Lines of Code (2017~2022)

Lines of code added for each of Cogmind’s special event versions over the years (2017~2022).

Yep, as expected Polymind is a chonky one. Also, fond memories of building an entire event in one hour--Launchers mode, Cogmind’s first ever April Fools Day event, which was unannounced and really caught people by surprise ;) (it was made and released on a whim that very morning). Note that some of these larger builds were accompanied by unrelated changes or fixes that could impact the LoC count, but the vast majority (if not all) of each was about the main event. Also note that some events added data as well, but I only compared source code for the purposes of this graph (it’s likely a similar ratio, except with Holiday Mode 2017 which was a data-heavy mode and that’s also part of the reason it was only playable in that version of Cogmind--I didn’t want to keep all that data polluting the later versions).

Anyway, time for Beta 12 Polymind. I’ve merged code before, but not anywhere near on this scale, so I searched up a new tool to help facilitate the process and found the lovely Meld. It’s very easy to use, can be navigated pretty much entirely by keyboard for fast merging, and supports three-way comparisons of directories and the contents of their files.

Cogmind Polymind Merging (Meld): Files

Meld comparison of files between Beta 11.1, 11.2, and 12.

This is perfect for my case since I can load up the original 11.1 alongside 11.2 and 12 while moving all the new parts of 11.2 into 12, most of which are detected just fine.

Cogmind Polymind Merging (Meld): Source Code

Meld source code comparison between Beta 11.1, 11.2, and 12.

There were just a few cases where I had to look a little closer due to some changes while writing Polymind that affected the overall logical organization rather than simple modification to lines of code.

Cogmind Polymind Merging (Meld): Source Code Merge Conflict

A relatively rare sighting during this process: red denoting an obvious conflict.

Of course this was also helpful for merging all the other supporting materials as well, so not just source code but also media files (SFX!) and external data/scripts.

Cogmind Polymind Merging (Meld): Data

Sample data comparison between log message definitions.

After completing the merge, I went and tested it out by streaming a round of Polymind in the IDE. It was meant to be a short one, followed by switching over to regular Cogmind to ensure that’s working properly as well, but I ended up having too much fun (and also playing well enough despite fooling around) to get really close to another Polymind win :P

Since it was basically a test run for dev purposes, there’s some dev talk in there, too.

Among my notes for Polymind, as I built it I was also recording features that would be nice if it were revisited one day for a significant update.

Probably highest priority among them would be making it so that almost any 0b10 robot has more relevant jobs it can do, especially combat bots. Derelict incursions! Calling for help from Garrisons! Basically things that would’ve required a lot more unique content and balancing to actually produce, and therefore beyond the scope of this event. At least there’s the low-hanging fruit of guard-type robots being able to remain at designated guard spots to lower suspicion, but even that system could be expanded.

Examples of other ideas:

  • proper faction responses to various host types outside 0b10
  • more machine interactions for 0b10 classes
  • add derelict reactions to having been a host
  • rework the “hidden faction” issue, since that doesn’t matter in Cogmind but clearly affects behavior in Polymind

I was thinking, and others were even later commenting, that Polymind could really be developed into a whole different game, leveraging the world of Cogmind and layering over it an alternative story and gameplay goals. Of course making another game is on a whole different level in terms of work :P

There are already other possession-focused roguelikes, a surprising number, actually, including also several 7DRLs, commercial projects, as well as multiple games in which it’s not the central mechanic but does at least exist as an ability.

In any case, some of the smaller bits from my notes that never made it into the Polymind event will likely find their way into a future release of Cogmind anyway, like I sometimes do for other major alternative modes when people are still playing them. There are still a couple fixes to come, but I didn’t want to do yet more releases during the event period, since there had already been several…

And even if Polymind is never revisited in a major way, experimenting with events like this, and the features required to get them playable, sometimes has a way of filtering back into the regular game in some form or another.

Like I discovered and experimented with what it’s like if the player has a way to temporarily be “friendly” with 0b10 (without actually changing faction alignment), harking back to that zxc idea about disguises mentioned earlier. Maybe we have a reasonable framework for that now?

Multitile Entity pushing is another feature that could offer a potential route for solving movement issues with very large bots (so long as it’ll agree with the AI--there is a distinct difference between allowing the player to do something and getting the AI to use it properly).

That backup utility for Mechanic repairs is definitely on my radar now, too…

???

???

 

Posted in Design | Tagged , | Leave a comment

Special Mode Design, Polymind Part 1: Architecture, Features, and Balance

At the end of 2022 I launched Cogmind’s most involved special event yet: Polymind (not to be confused with my earlier unrelated 7DRL, POLYBOT-7!). The release announcement already covers the basics, so I’ll assume you’re familiar with those already and avoid rehashing most of that here. Instead let’s talk development! Now that the event is over, towards the end we’ll also be taking a look at player stats from Polymind, which also had its own leaderboard for the duration.

Cogmind Polymind Cover Image

Polymind cover image. The word layout was actually created in REXPaint, which was faster than trying to use Photoshop since it was easy to drop in Cogmind tiles and manipulate those on a grid.

In terms of dev investment, Polymind is Cogmind’s most involved alternate mode yet, requiring well over a hundred high-paced hours of mostly coding work to realize. Unlike most prior events which tended to be concentrated in just a few areas of the code, this one is all over the place. It modifies the AI, player input, alert mechanics, part interaction… all sorts of stuff, while also adding many of its own new mechanics, too.

In short, Polymind enables the player to take direct control of almost any other robot, basically “possession” mechanics as found in many other games. For years players have jokingly imagined roleplaying as a Worker or some other lowly non-combat robot frequently seen roaming the complex. In Polymind it’s not only possible, but doing so can even aid in your survival :)

In a complete departure from Cogmind’s normal core mechanic, the player is unable to attach any parts, or even evolve more slots, but is instead entirely dependent on hosts for protection, or avoiding detection completely by melding into Complex 0b10. While undetected, you can move around as if you belong, trying to keep your suspicion down, or eventually need to figure out a way out of trouble when things start going south. Fighting is always an option, too, but can be a dangerous one in the long term without access to Cogmind’s normally superior capabilities.

Is this Even Possible?

There were a lot of questions when initially considering whether to implement this mode, since more often than not a common but high-level comment like “[feature X] would be pretty cool…” is so much easier to say than actually build :P

So the very first thing I had to do after selecting Polymind from my list of potential event ideas was to do a feasibility study looking at the potential roadblocks with respect to Cogmind’s fundamental architecture and design.

Architecture

A good many roguelikes are coded such that the player and non-player “actors” (creatures/mobs/entities/whateveryoucallthem) are based on the exact same systems and data structures. This is really helpful for balancing the game, simplifying player understanding of mechanics and interactions, and of course simply building the game where you can have a ton of interactive systems but don’t have to always treat the player as some separate special case.

In this sense, roguelikes probably lend themselves well to possession mechanics, inherently being easier to swap in some other actor for the player to control without worrying about too many unexpected side effects. While Cogmind does have a few player-specific exceptions with regard to certain mechanics where necessary for balance reasons (usually being a little more lenient on the player), for the most part it follows this roguelike design tenet: The player is just another Entity composed of a handful of base stats and operating as a collection of items that confer the majority of their additional capabilities.

That doesn’t mean Polymind was completely smooth sailing on the architecture front, just… close to it :P

As I wrote about in Item Variants and Randomization in Roguelikes, data for Cogmind objects such as items (and Entities!) is mostly held in static databases loaded on startup, essentially a large number of game-defining values which are assumed to remain unchanged while Cogmind is running. I already had to address this roadblock in order to implement Constructs with variable stats for the upcoming Scrap Engine mechanics, so I was able to draw from that experience and code when working with Polymind. Directly editing the underlying data seems easy enough, and makes sense, but could have unintended side effects since it wasn’t built with that in mind, not to mention requires separate attention to actually loading and saving the relevant unique data changes for runs in progress, data which exists outside the normal serialization process. Anyway, as with Constructs it works but it’s a bit crude, as one might expect when venturing outside the bounds of what a system was designed to do in the first place…

Polymind also benefited from RPGLIKE, another earlier special mode, for which I had already added indirect access to a number of Cogmind stats that might be modified through abnormal/non-part means as a simpler alternative to editing underlying data which I had always wanted to avoid before. For example, instead of editing Cogmind’s base sight range in the database, leveling up that stat in RPGLIKE would edit a separate value, and retrieving sight range for an Entity first checks whether it’s the player, in which case it will draw from the separate value, or instead from the database for any other Entity. This offers another avenue for changing that value (and a few others) where applicable, if I don’t want to worry about saving and loading things directly to and from a supposedly static database…

So while this mode was already a lot of work, it would’ve been even more time-consuming if not for the fact that it could be built on the foundation of several big projects that came before.

In the end it’s not an ideal solution for the architecture side of things, but it works, and I’m open to cooking up a bit of spaghetti when it comes to putting together special events since they’re short-term projects isolated in the code anyway.

The “possession” process itself is interesting in that it actually destroys the host and transfers their stats to Cogmind, while separately storing as much of the original information necessary to recreate the host if and when the player releases control at a later point.

Cogmind Source Code: Polymind Host Stat Transfer

The code used to take control of a host, transferring its stats to Cogmind, along with the reverse process for restoring Cogmind’s default stats upon releasing control.

 

Cogmind Source Code: Polymind Host Data Storage

Data stored about a new host before destroying it. Not very much is required for recreation, since the majority of a robot’s values are either static or properties of their constituent parts, all of which are simply returned/reattached to the host later (any that still exist at the time, that is). hostID, killCount and routeIndex are actually not even necessary for the process--those are recorded purely for scoresheet generation purposes, since it wants to create a leaderboard of the hosts with top kill counts, and where they were originally found.

Due to how this latter system operates, storing the host’s original faction to restore it later, one side effect allowed players to discover a facet of Cogmind’s internal design which wasn’t previously known (and is confusing unless I explain it :P).

As players see it, Cogmind robots don’t actually indicate their specific faction, instead simply showing whether they are friendly, neutral, or hostile to the player, so sometimes in a few special case branch maps, as far as the data goes NPCs might technically belong to a “faction” that doesn’t behave as one might expect in another map. What this means is that specifically in Polymind, controlling such an NPC and releasing them in one of these other maps might cause them to be friendly to robots one would think are their enemies!

I did this early on in Cogmind development since it wouldn’t have any noticeable impact on the game, reusing “factions” on different maps for different purposes in order to keep the total number of required factions as low as possible. This is one of many things that could be addressed in the long term if more work was put into this event, but the focus was on gameplay in the main complex (more on that decision later), and the potentially unexpected faction behavior actually only comes into play in very few situations anyway.

Honestly I recall considering a more dynamic faction system for pre-alpha Cogmind, since at the time I was close to building one for X@COM, Cogmind’s predecessor and the source of its initial code, and although I later did do that for X@COM, I didn’t really see a strong need for it in Cogmind compared to the overhead it would add, so decided to forgo it. I’ve since started adding a few extra faction slots to Cogmind for different purposes, but it’s still not a dynamic system which would be even more flexible.

Design

On the design side my primary concern was interface complications, since all necessary interactions must be fully mouse and keyboard compatible, where a deficiency on one side or the other will as usual serve to limit and guide the mechanics. While in some cases mouse input in particular did require special attention, I was happy to discover that pretty much all of my goals there were achievable.

One new UI feature required on several different levels in order for Polymind to even be feasible is a toggleable force melee mode. Normally a “force melee” type interaction is enabled by holding a modifier key, though technically due to command conflicts has never been possible when combining force melee and diagonal movements using vi key directional input, for example. Alternative input options exist for such an occasion (not incredibly common), but for quite a while I have always planned to address the issue more directly with an optional universal toggle, so this was the perfect opportunity to finally make it a reality.

Cogmind Special Commands Menu: Force Melee

Force Melee on the Special Commands menu, toggleable via Spacebar then mouse click, or from the main interface with Spacebar-e or Shift-Alt-e.

(I’ll write about more mode-specific interface features later.)

Mechanically speaking, one of the big potential roadblocks was how to let the player remain friendly with all those bots out there that otherwise attack on sight. It’s not as simple as changing faction relation settings, which would introduce its own set of bigger problems. Instead I found a simpler solution to circumvent faction considerations and treat the player differently depending on their current host and status: just don’t let hostiles add the player as an enemy if they don’t currently see them as one.

Each AI normally stores its own list of enemies that it remembers for however long, a duration set initially by the AI’s robot type and can be shortened by system corruption or ECM effects. Polymind-Cogmind is blocked from being added to “hostile” AI memory if using a host friendly to the AI (based on that host data we stored earlier!) and not currently suspicious.

Technically under this system, if the player manages to break line of sight with hostile pursuers and significantly lower their suspicion level, perhaps in combination with switching to a new host (which itself lowers suspicion), they can once again be removed from pursuers’ memory and operate in safety, though the pursuers will likely investigate the local area and potentially discover the player again if suspicion again reaches the maximum level.

Technical design issues resolved, the other early requirement was to convince myself that the mode would actually be fun.

This aspect can be harder to nail down in gamedev, but at an early stage there’s really no need to get into the nitty gritty details--I just needed to focus on the bigger picture: Will this create challenges that the player can overcome by making interesting decisions using the resources and capabilities they have available at the time? What will the player be thinking from moment to moment during the various scenarios I can envision under the type of gameplay this will lead to? What can I do or add to help facilitate that interesting gameplay?

This line of thinking leads into some Polymind-specific features like the free intel system on controlling a new host. And of course first and foremost this is also where the suspicion system and corresponding jobs system come into play. I saw enough flexibility in those that players could find a fun balancing act to carry out in there, oscillating between suspicious and unsuspicious as necessary throughout their run to achieve their goals amidst evolving circumstances. Assuming the numbers are set right, that is, but balancing is for later when the features are actually implemented. The important part is to know that it’s theoretically a good track to be on before investing the required dev time.

Multitile Robots

This was huge (haha). Multitile robots are cool. They also tend to be a nightmare to work with. I wrote a lot about them in Developing Multitile Creatures in Roguelikes, but letting the player control one is a different and even more complex matter!

Multitile bots felt like they were close to derailing the project in its latest stages, since I had repeatedly pushed them further and further down the TODO list until they were just about at the end, then by the time I got to working on them and we were past my initial deadline for completion, all the related bugs sure took a long time to weed out (Polymind was definitely completed later than I wanted).

At one point it felt like they might need to be cut--essentially no controlling multitile hosts allowed, but I really felt like we had to have them in there if at all possible! They’re just too cool, and an important goal of this mode was to attempt to allow the player to control almost anybot. Even if only a few players ever ended up doing it, it needed to be a thing (cue late-hour coding sessions xD).

My first experience with this was back in 2019, when players were postulating what it’d be like if Cogmind could occupy multiple spaces as 2×2 bots do, so at the time as a joke test I simply changed the one variable determining Cogmind’s Entity size and surprisingly it actually more or less worked. Now that’s a far cry from what it takes to have proper full control of a large robot, but at least it showed me that such a change doesn’t immediately break the game!

Cogmind Testing Player Control of Odd 2x2 Entity

A recording from 2019 showing the quick and dirty version of a 2×2 Cogmind. Of course, Cogmind doesn’t have a tile large enough for it to occupy multiple cells like true large Entities, so instead the game automatically renders other adjacent tiles found in the tileset positions where such image data would normally be stored :P

 

Cogmind Joke 2x2 Bot as Sketched by Zyalin

A quick and dirty sketch by Zyalin to go with our innovative multitile Cogmind design that seems to be melding with various other robots…

So what’s the big deal with multitile actors?

Limited freedom of movement due to terrain is not something we’d address here--at worst they’ll just have to blast open doorways, take down walls, or even widen shorter corridors if they really want to head in some partially obstructed direction. But another movement issue that absolutely must be addressed is interaction with other robots, because those are everywhere, not to mention moving around most of the time and therefore easy to become repeatedly annoying obstacles.

For this I decided it’d be great to have them just push any blocking robots out of the way. Not like the ramming, crushing, or kicking that normally results from bumping another non-allied robot, mind you, just nudging anyone out of the way, regardless of their affiliation.

This is a pretty sensible and elegant solution, I think, although I admit it was kind of a little recursive nightmare--recursion be like that xD. I had to set up specific tests to be able to reliably repeat and fix issues, and just when I thought it was fixed, filling a room with all manner of other robots and randomly pushing through them in various directions would crash the game again in some new and unexpected way, or push one in an unexpected direction. The weirdest issue I recall was when pushing one blocking robot managed to crush it to death while simultaneously pushing a different robot that wasn’t even on the target path!?

Eventually it always worked, whew :)

Cogmind Polymind Multitile Entity Pushing

Pushing blocking robots out of the way while in control of a large host.

On the UI side, multitile Entities naturally also have a fair number of issues that require special handling, so much so that I entirely separated out the code for their player movement input processing, as well as excluded from those options certain actions that would be problematic in more ways that I didn’t have time to address (such as interacting with machines, or ramming with intent to damage or destroy robots and terrain).

Still, they can perform a majority of useful actions, and most importantly they work!

Cogmind Polymind Multitile Entity Path Preview/Highlight

Other helpful tweaks specific to multitile player-controlled actors include showing the full-width path preview/highlight. (As usual the path can be highlighted in a brighter color, but this screenshot is taken with the default appearance when simply moving the cursor across the map view.)

After all of the above architecture and design worries, I was pleased to see Polymind work out in the end. While at the beginning I could imagine a lot of potential issues down the road, I also really wanted to bring Polymind to life, so rather than fret over all of them in advance and try to draw up detailed plans, as soon as I had a general feeling that it might be feasible I simply started, which helped avoid the inevitable temporary paralysis from seeing so many issues without clear solutions.

We’ve barely scratched the surface here and you can already see there were tons of moving parts behind this event (and as you’ll see later quite a lot of code!), but sometimes you have to just say “I’ll figure it out when we get there” and hope for the best :P. At least the initial feasibility study where I examined some of those fundamental questions suggested I wouldn’t hit any serious show stoppers on the way!

Polymind-specific Features

Beyond simply taking control of other robots, sharing their parts and basic stats, conceptually what does that mean, both in terms of gameplay and theme.

Thematically this goes back to players’ original desire to roleplay a Worker, doing Worker things. (And actually even before all that, one player in particular (zxc) always thought it would be fun to be able to temporarily disguise oneself in the regular game purely in order to bypass enemies, though a combination of significant technical hurdles and balance issues kept me from considering it in a more serious capacity.)

This is where suspicion and jobs come in. An idea central to the gameplay here is to remain unsuspicious, and for that to work we clearly need to define a new set of capabilities outside the scope of what’s offered by the game through normal part interactions.

Cogmind Polymind Notes: Class Special Abilities

An excerpt from my initial Polymind design notes (itself a 3k-word document xD) on what types of new abilities would be necessary to offer a decent range of actions.

The above list of abilities adds some of the tools necessary to remain unsuspicious. It is not, however, an exhaustive list of ways to modify suspicion (either up or down), since other relevant actions are already covered by existing behaviors, such as combat, or even just Operators working at terminals (hacking!) or Minesweepers collecting traps. But those are very easy to incorporate since they already existed in the code, whereas the notes were focused on the creation of entirely new features which would require separate implementation.

Yet more thematic abilities were listed as possibilities, but would be too complex to tackle in the short term, and for little benefit compared to the importance of core behaviors one expects from the bot classes listed above.

New features also generally require new supporting interface elements, at least concerning QoL to smooth out the experience. For example some of those class abilities require a way to designate valid targets, such as areas for tunnelers to dig.

Cogmind Polymind Tunneler Host Demo

Tunneler hosts are fairly limited in the areas they can help out, but at least excavating is an extremely effective way of lowering suspicion.

For the Engineer in particular I decided Polymind-specific highlighting was unnecessary, since by default even in the regular game it’s pretty obvious when areas have been destroyed and are in need of repair.

For a few of the more complex hosts, it became necessary to blink other robots in white or pink to imply what action would take place if interacted with given the player’s current host and status. This is because item toggle state, suspicion level, and whether the target is hostile could all impact what action currently applies.

Cogmind Polymind Mechanic Host Demo

Demonstrating the use of a Mechanic to dismantle a lone Grunt, after which a Recycler steals and recycles its parts, then we put it back together with backup gear. Toggling the Recalibrator highlights valid targets in the color matching what will occur upon bumping them.

The actual meaning of these colors, and class abilities in general, are conveyed through the Polymind info panel for the current host, accessed through the usual special event UI window over the bottom-left corner of the map.

Cogmind Polymind Programmer Host Demo

By necessity Programmers are one of the most complex hosts to control since they have multiple capabilities, but there is no Polymind-specific command system so everything must be managed through the standard actions, and reflected on the map so the player knows what will happen.

The info panel includes all of the host’s innate stats, like built-in energy generation and damage modifiers, so playing Polymind and controlling different hosts offers an interesting alternative way for players to gain deeper insight into robot capabilities (and weaknesses!) even in the regular game.

Cogmind Polymind Heavy Host Info

Heavy-class hosts are really powerful. My first Polymind run won by basically spending most of the time in one of these guys obliterating everything, and sometimes doing my job to wait for the right moment to strike ;)

Also on that panel is a list of any intel obtained from controlling a new host of that class. The intel idea was something I added only at the very end, not only because it’s logical, but also for design reasons: Players are trying to make informed decisions as they hop around between bots, and intel helps in that regard while also giving yet another reason for wanting to take over multiple different bots to begin with, depending on the circumstances. So it’s not just about what the bot is capable of, but also what information they’ll reveal when you take control. This info is also often tied to their respective jobs, so this feature brings way too many advantages to leave it out…

Cogmind Polymind Hauler Host Info

Haulers have some okay intel, but were one of the non-combat classes that unfortunately did not get a job as a host. Logically speaking there is material to work with there, since they normally do have tasks to complete, but implementing them would’ve been more complicated.

Fortunately the intel portion was much less work that it otherwise would’ve been, because it drew directly from all the normal robot hacks you can perform on 0b10 bots to get information!

Cogmind Polymind Notes: Class Intel Types

My Polymind design notes specifying intel from various classes, the majority simply correlating to various existing robot hacks.

 

Cogmind Polymind Watcher Host Intel Acquisition

This Watcher host intel acquisition sequence and effect looks suspiciously like a successful map_route hack! (a good bothack, by the way)

Balance

This mode was designed under a lot of time pressure, meaning not much time left at the end for proper balance work. Much of the balance for Polymind’s first release was based on hypotheticals, though I do think it worked out pretty well for the most part.

Once players got hold of it, and I had an opportunity for real playtesting myself, there were multiple updates within a week of release to make some adjustments, but still nowhere near the attention a mode like this would get if it were to become something even bigger. As a timed special event though, I’m satisfied as long as it meets the goal of being fun for at least a little while.

Aside: Designing these events feels somewhat like a 7DRL--basically you’ve got a new core mechanic around which to quickly design a unique experience, just within the confines of Cogmind’s world. So in that sense even though I rarely participate in 7DRLC (even though I always want to and have lots of ideas for it xD), technically I’ve made a good many “XDRLs” over the years. In fact, on that note the idea for POLYBOT-7 came from what was originally going to be a Cogmind event!

On the topic of fun, the relevant “numbers” mentioned earlier could definitely have used more tweaking, but that level of balance requires a fair amount of data that we just didn’t have yet.

There are many numbers involved, but among the most important, and numerous, is the cost of taking control of each type of host. Of course it can’t be free, so for this I resurrected the idea of Protomatter first introduced for the RPGLIKE event, a matter-like item salvaged from some robots as an alternative mode-specific resource.

Even if I did have time for proper playtesting (I didn’t…), we’d still need some kind of starting point for setting these costs, so I decided to base them on a formula derived from each robot’s core integrity and exposure:

cost = [core_integrity] * (1 + ((0.40-[core_exposure%]) / [core_exposure%]))

This formula uses 40% as an average core exposure and increases or reduces their integrity-based cost by a corresponding percentage when they have a lower or higher value than that. The actual costs are not as important here, it’s more about relative cost, since we can always tweak the Protomatter drop rate and amounts as necessary, but the idea is to assign a higher cost to more powerful robots, and by design power level generally corresponds to core integrity and exposure.

I originally tried a formula based on part rating, since many capabilities are based on parts, after all, but found that to be overall too unreliable as a basis for cost. Basing it on integrity/exposure isn’t perfect, either, but it would have to do!

I also considered but did not factor robot speed into the formula--faster robots do indeed enjoy greater survivability as a result of their speed, but as far as Polymind mechanics go, balance-wise it is not only more likely that faster hosts will lose their capabilities, it is also generally more likely that high-integrity/low-core-exposure hosts will be more capable of acquiring additional Protomatter (through the destruction of other robots) in order to keep taking control of other targets. Fast hosts certainly have their advantages, but generally do not contribute as much to later progress (or score, for that matter).

While building the event I was worried Polymind might be too easy overall, but as it turns out the difficulty ramp is similar to the regular game, growing increasingly challenging all the way to the end. To give that claim some context: Cheaper host-dense early depths make it easier to avoid detection completely if desired, compared to later maps which are much larger, along with the usual increasingly powerful enemies roaming about despite Cogmind having access to fewer tools (generally little to no inventory, and no part swapping, slot expansions, or most consumables). Combat becomes all but unavoidable at some junctions.

Polymind is still very winnable, so that’s good, but while I like the resulting challenge level, it could still stand to be tweaked and expanded for an even smoother, better-balanced experience.

As usual when working on a new feature, while building it I also made a list of areas or potential add-ons that could be important to examine for “optional balance tweaks” later on, depending on how the final gameplay turns out and what players do with it, though for the subsequent updates I did not yet need to revisit that list so much since many of those options were implemented shortly before even the first release once I realized there’d be no time for playtesting and instead continued on the instinct that they’d inevitably be applied anyway. (I had wanted to let patrons try out Polymind in advance and tweak from there, but again there was no time.)

Polymind can especially get weird outside Complex 0b10, in branches, since the mode was mainly designed around non-branch content. But unlike some of the previous events (Abominations, for example) and challenge modes, I didn’t want to prevent the player from visiting branches and interacting with much of the game content, especially when it’s possible to take control of a whole bunch of different hosts out there as well, plus trigger interesting game events. So while all maps were left accessible, we had to simply assume that all the other factions recognize you as Cogmind regardless of your current form, and plot/NPC interactions more or less remain the same. So that’d be another area that could be expanded or addressed in other ways, a topic I’ll get into more at the end.

Players Meet Polymind

Part 2 of this article looks at player stats, strategy, merging code, and more…

Posted in Design | Tagged , | 2 Responses

Year 9 of the Cogmind

Early this year Cogmind celebrated its 10th anniversary since it was first released as a 7DRL, and as the year comes to a close it’s once again time for an annual review to take a quick look at where we’ve been, and where we’re going!

First here’s our yearly dev collage showing off in visual form some of the progress and work since our last review, version 2022!

cogmind_development_year_9_small

Selection of images from the past year of Cogmind-related development as posted on this blog, forums, and social media (larger size here).

Development Time

While lots of cool things have happened this year, I’m a bit disappointed that the past couple months were shattered by health and IRL issues (mostly repeated Covid interruptions), slowing what would’ve otherwise been an even more productive 2022. Technically I put in 7.5% more hours than the previous year, but the total fell 13.7% compared to 2020.

cogmind_developent_time_cumulative_hours_15467_221130

Cumulative hours of Cogmind-related work, 2013~2022.

Looking at the cumulative chart, it’s interesting to note that the past several years show a less steep incline, but also lack the obviously “shelves” from even earlier years. Those were from various vacations/traveling when I’d put development on a longer pause, though with Covid and travel issues out there it’s now been nearly three years since I left the country xD

So development has been progressing at a more constant pace rather than the sometimes stop-and-go of before.

On reviewing the data I’m happy to see that my game-to-non-game-stuff work ratio has continued in my preferred direction (I shared a graph and more info about this trend back in the 2020 review), so more working on the game itself and less community-facing marketing-type stuff. The Year 8 ratio was about 4:3, while this time it’s closer to 5:3.

Obviously community interaction is quite important and still plays an ongoing role in development, as always, but at this point I feel it’s more important to focus on expanding content as much as possible.

By extension this does mean fewer blog posts and spreading the word about Cogmind through various secondary channels, which in turn means less revenue overall (down 20% this year), but patrons continue to help in that regard :D (so we get to focus more on the game itself!)

Of course that’s only one factor in the revenue drop, but it definitely plays a significant role.

Releases

This year’s major release was of course Beta 11 “Mechanical Renaissance,” in the works for 17 (!) months, and a massive set of new toys, challenges, revamped mechanics, and more.

Cogmind Beta 11 Release Art

Cogmind Beta 11 release art, by Zyalin.

Following the Beta 11 release I was also finally able to put together the Beta 10 player stat summary, complete with graphs and analysis

Beta 12 was supposed to be released this year, but it was originally envisioned as just one new map and a faction to go with it. So yeah that’s easy enough, right? Definitely could release it this year according to my plan, yeah? Well I hadn’t even started on that before patrons voted to expand Garrisons, which sucked up a huge amount of time but everyone seems to agree has turned out quite well.

Cogmind Garrison Map Generator Considering Encounter Locations

Cogmind’s new Garrison layout generator considering locations suitable for inserting additional encounters in outlying areas (dark gray boxes). Read more about its design here on the blog.

In addition to lots of new content and strategic possibilities, the Garrison expansion even added a whole new faction system.

So we’re done, right? Ready to do that Beta 12 map? Apparently not, because as part of the potential Beta 12 content I decided to experiment with a new kind of mechanic I’d been considering for years: randomly generated parts.

That turned out to be pretty complicated to design and integrate, and was successful in the end, though despite all the work it’ll actually end up being a secondary part of the release with no direct connection to the main content… Still, it’s fun and creates a whole new build style, and now I don’t have to keep thinking about maybe doing it one day because it finally exists :P

Community

leiavoia, creator of the Dataminer scoresheet viewer, has continued to improve its feature set (see community stats as well now, and compare your stats to those across the community), and on top of that created some great guides, like leiavoia’s new player guide for those who want some more early-game tips

cogmind_leiavoia_new_player_guide__collage

and the heavy combat guide, a style which leiavoia is very good at ;)

cogmind_leiavoia_heavy_combat_guide_collage

aoemica continued expansion of Cog-Minder, including not only the build and combat simulator and tons of raw searchable data but now also with an amazing new wiki including maps, encounters, strategies, and all sorts of good stuff.

cogmind_aoemica_wiki_sample

A sample entry from aoemica’s new wiki.

As a resource it already blew Cogmind’s original wiki out of the water (so much so that earlier this year I just put a link on the front page of the wiki leading to Cog-Minder), but at this point I guess the official community wiki has been blown… clean off Tau Ceti IV xD

For my part, I’ve been doing less Cogmind streaming in 2022, instead sharing other roguelikes, but have done several prerelease streams to demo new features coming to Beta 12, and earlier in the year before Beta 11 was released we did some fun and useful dev streams with the community, a different sort of format for back and forth about mechanics and balancing than the usual approaches on the Roguelikes Discord server.

I’ve also been writing more general roguelike-related articles, too, looking at game design, item randomization, and backtracking.

You can now find me on Mastodon, too, where I’ll be sharing info about roguelike development, other roguelikes, and of course the occasional Cogmind update. After joining last month I also did a little summary of my roguelikedev history.

Kyzrati Roguelike Dev History Summary on Mastodon

As usual, if you’ve got a moment there’s some days remaining to vote for Cogmind over on IndieDB. Always nice to make it in their Top 100 list for a little extra exposure when that comes out. Made it every year since 2014, so may as well :) -- Update 221211: Made it into the Top 100 again :D

2023

I foresee, um, more Cogmind, yes ;)

As mentioned, Beta 12 is delayed into next year, and is going to be way bigger and even better than originally planned. Aside from the other new features already completed… that bit about it including one new map? Yeah that was wrong, too :P

Turns out I can’t add a new faction and related lore without going a bit overboard with the whole thing, so what was one normal-sized map will now be three large maps spanning the early-, mid-, and late-game, plus a whole new ending (Cogmind’s 10th) to top it off, this one quite unlike the others. Tons of new items, mechanics, robots, encounters, NPCs, and more on the way…

Cogmind ASCII Art Samples - Beta 12

Sample item art from Beta 12 (open image for full size).

Progress has been good overall despite the relatively short amount of time invested on this part so far, since now we’re mostly working in familiar territory, using all the tools I’ve put together over the years for content creation.

Cogmind Artisan at Work

A new type of bot at work, busy doing… something :)

Some of the work I’ve been doing is even related to beta 13, which is closely tied to beta 12 in several ways, and will include at least one new map and lots of new mechanics and NPCs with more unique AI behavior. I can’t promise that one will happen in 2023, but I will at least say it’s not impossible.

WARLORD FOREVER!

Cogmind Warlord and other bot models in front of partially explored Research map

(also Cogmind forever, apparently!)

Posted in Annual Review | Tagged , , , | 1 Response

On Backtracking in Roguelikes

More than once over the years we’ve had discussions in the roguelike development community regarding the idea of “backtracking,” and with good reason: whether or not to allow it has quite a lot of implications!

Here we’re primarily talking about the player revisiting earlier floors on their journey, rather than backtracking within a single map (though I’ll cover that topic a bit separately at the end), and our discussion focuses on roguelikes of the dungeon delving variety, since open world games generally allow backtracking by default.

Examples

Let’s open with a sample cross section of the types of map transitions available in the roguelike space:

  • DCSS: Floors generally contain multiple stairs which lead to either the next floor or back to the previous one. The majority of roguelikes fall into this category, although not necessarily the multiple stairs part.
  • Cogmind: At the other end of the spectrum, some roguelikes don’t allow backtracking to earlier floors at all. This group also includes DRL/Jupiter Hell and Infra Arcana, but it’s a pretty small group overall. (DCSS variant “Hellcrawl” removes the up stairs from that game, notably increasing the difficulty.)
  • Moria/Angband: These are unique in that backtracking is allowed, but by default it generates a new floor each time! Although not true backtracking in every sense, it will naturally count in some ways. The approach is quite thematic, in any case, getting lost exploring the Mines of Moria, or maze-like fortress Angband :)
moria_using_up_stairs

Heading back up some stairs (‘<‘) in Moria for your very own “I have no memory of this place” moment.

  • Rogue: Interestingly, in the original Rogue backtracking as a part of the ongoing diving process was not a thing! You can only proceed down stairs until you acquire the amulet, then you can finally go up stairs, but each floor in the return direction is generated anew, essentially requiring playing through 51 floors to beat the game!

One traditional reason it might make sense for roguelikes to allow backtracking is because the goal is often to reach a destination then escape back out, not unlike your typical RPG dungeon adventure.

Different games handle the escape in a variety of ways, perhaps throwing some kind of new challenges at the player along the way, for example being intercepted by powerful monsters the entire way in DCSS, or being harassed on the way out of Angband by an angry Morgoth after stealing one of the Silmarils from his crown in Sil (or the newer Sil-Q).

The Ground Gives Way has an especially interesting approach, having the dungeon’s statues come to life after you acquire the trombone relic (yes, trombone) at the bottom, and you have to escape without being killed by the animated statues or whatever other creatures might still be in the way because they weren’t dealt with before. The interesting part is that you can see all these statues on the way in, foreshadowing potentially difficult bottlenecks on the way out (assuming you can’t directly confront and outright destroy all the living statues, a decent assumption for many builds).

tggw_statues

These statues will come to life on the way out and try to stop you--better have a plan when the time comes! (Tip: If you put down the trombone they’ll stop following you, giving you an opportunity to deal with other issues, rest, or prepare in other ways.)

By comparison, Cogmind is purely about escape, starting from the inside, so there’s no reason to go back as part of the conclusion.

To Backtrack or not to Backtrack

I was originally going to divide this article into two sections highlighting the “advantages and disadvantages” of each approach, but it’s not always clear whether a given mechanic or consideration would neatly fall under one of those two categories, especially given that additional design adjustments can turn a drawback into a positive, or otherwise mitigate issues, so it’s more a question of simply examining the implications of a particular choice and accounting for it in a game’s wider design. So instead we’ll take a topical approach.

Realism

Being able to backtrack is generally going to be more realistic in the RPG sense--of course your character should be able to go back and pick up that item they left behind, or fight that enemy that scared you away before. Plenty of roguelikes are designed as CRPGs first, so it makes sense they’d want backtracking for this factor alone, if anything.

Some roguelikes don’t go heavy on realism, in which case backtracking for this reason can be considered a non-issue and solely a decision to be made within the greater mechanical design, though this does mean progress ends up feeling gamier overall.

Since thematic plausibility and lore are quite important in Cogmind, I added reasoning for why you can’t backtrack, so that’s an option as well. In general it’s good practice to try to explain anything that doesn’t work as players might otherwise expect, and the one thing you can count on setting player expectations is realism! Realism is optional (these are games!), but ideally we want everything to at least make some sense within the context of the game world itself.

Stashes

While on the subject of realism, it also makes plenty of sense you can go back to collect resources left behind earlier. In a game setting, though, this can be quite an annoyance from a design perspective (harder to balance!) and is likely to either become a player crutch or lead to tedious optimal play (a topic I covered in my game design philosophy article).

As a result, you sometimes see developers coming up with ways to address issues arising from players creating “stashes” of items to return to. DCSS has an interesting historical summary of changes related to its stashes, including methods to decrease player reliance on them.

As a fully item-focused roguelike (in that items are everything to you, with no other types of character progression), stashes used to be extremely useful for an optimal player in TGGW. That’s before the aliens showed up :)

Aliens arrive while you’re napping to steal things the player has touched, and you can sometimes catch a glimpse of them running away with an item, or theoretically even try to stop them before they teleport away, but it’s pretty tough, so you’re highly encouraged to always keep anything you want to use for the long run. Under this scheme, strategically the player may also opt to leave an item on the ground, untouched until they might want it, but it can be hard to justify that decision since in many cases if it’s a quality item you won’t be entirely sure what specific item it is until you’ve picked it up to identify and it’s got that human scent all over it :P

tggw_alien

Caught red-handed, but good luck stopping them.

An alternative approach to stashes is to simply embrace them as part of the design, even going so far as to outright give the player a safe location to stash extra items they don’t need at the moment, for example in a town. Heck, throw in shops to visit while you’re at it :D

angband_town

An Angband town, which serves as a hub to return to for stashing items, or shopping.

 

angband_home_inventory_sample

An example of a player home inventory in Angband (taken from here among the great LPs by TooMuchAbstraction).

Or an even simpler approach: just give the player a practically infinite inventory :P

Of course stashes aren’t always an issue--depending on how the game works there may not even be a use for them, although the reason it comes up so often in roguelikes is that the genre is overall fairly item-heavy, not just different useful gear but especially consumables, which leans towards stashes being a thing.

If tight enough, a roguelike’s typical food clock or other similar feature pushing the player forward might also serve as a suitable countermechanic, or impose prohibitive costs on abuse/overuse of stashes.

Grind

Grinding as a strategy, or even existing as a possibility, is pretty unwelcome among modern roguelike fans. Not universally so, to be sure, but grind tends to be more of a roguelite thing.

Preventing backtracking cleanly cuts out a number of potential types of grinding (such as returning to fight weaker enemies to maximize XP or resources), thereby serving as another feature contributing to a player’s forward momentum.

Of course for some roguelikes, grind is an acceptable part of the gameplay for those who want it. No doubt the grindiest of classic roguelikes is Moria/Angband, and this honor is a direct result of backtracking as per the mechanic described earlier. Simply going up and down stairs to generate new maps (“level scumming”) gives access to theoretically almost anything that can appear at a given depth, so a player can use this to not only raise more levels from repeated combat before pressing forward, but perhaps even more in the spirit of ultimate grinding, you can keep regenerating maps to search for specific items.

In a way Angband further facilitates some of the grinding process with its “level feeling” text on entering a map, revealing how dangerous the floor feels, how good the items potentially are, and maybe even a “special feeling” like “You feel strangely lucky…” or “You have a superb feeling about this level” to indicate additional features such as a vault.

Then in 2015 the Angband maintainers doubled down by making the grind even more player-friendly, adding level feeling information directly to the status bar in numerical form.

angband_with_level_feeling_indicator

Angband level feeling indicator “LF:X-Y,” where X/Y refer to the danger/treasure level on a scale of 1~9. Y even shows as $ if an artifact was generated on the current floor.

Well fast forward to 2017 (27 years after Angband’s first release) and a new option is added to the game, one that changes everything: persistent levels!

angband_birth_options_persistent_levels

Birth options menu during Angband character creation. Even after five years, birth_levels_persist is still considered an experimental feature with potential bugs to work out.

Yes it’s optional and clearly not the default considering it removes one of Angband’s defining features, but this addition made the game playable for some who hated the original incentive to grind, dangling there like a carrot at every depth, and also gave existing players an alternative way to enjoy the content. Some technically were already playing it that way before, without the grinding, but enforcing that conduct can take a lot of self-control, especially in a game with permadeath ;)

Anyway, Angband has taken up a good chunk of the article so far because I think it’s an interesting study for this topic, considering you can experience two very different approaches to backtracking in a single roguelike. There’s a lot of conversation out there about how different types of players prefer one or the other.

Difficulty

For the same reason backtracking might make way for grinding, it also serves as a way to help soften difficulty spikes, especially those that might occur immediately on entering a new (and presumably more difficult) map. If finding it hard to press forward after using the stairs, one could theoretically go back and switch to a different map (Angband), or approach the new floor from a different point (DCSS with its multiple stairs), or go grind more resources/XP left behind in earlier areas to help advance.

Cogmind has very large maps so this isn’t as much of an issue--you’re generally not going to full clear all maps anyway, and there are usually many possible routes within a given map (especially counting terrain destruction, employed liberally by players :P), so encountering a dangerous bottleneck required for progress is not all that common. Cogmind also has “spawn protection” on main maps explicitly to give the player more breathing room on entry (though not in optional branch maps, where ambushes are indeed possible! just an extra part of their potential danger in exchange for the rewards within).

cogmind_map_export_exploring_research

It’s not usually in your best interest to explore the entirety of every map in Cogmind--they’re big and you’re likely to lose more than you gain from doing so. Above is an export of one player’s unusually lengthy journey across a large swathe of a 200×200 map in search of a particular destination (a desired exit).

Zorbus is a good example of difficulty spikes on entering a new map where backtracking is not allowed. You’re in for a crazy ride almost any time you take the stairs in this DnD-style roguelike, especially given the pretty significant jump in danger from map to map, where all the enemies are higher level than you until you catch up, and thin them out a bit first.

zorbus_map_entrance_ambush

My party in Zorbus getting ambushed by all manner of powerful enemies coming from the west, south and east right outside the opening room (clearly the NPCs know what’s up!). Large battles are common on entering a new Zorbus map. They will spot you, hunt you, tell their friends, then hunt you with their friends :P

This aspect of Zorbus was softened a bit following response to the game during its wider release on Steam recently, at least protecting the player from being right near the level boss on entry, which could understandably be pretty devastating xD

Stairs

Stairs are an interesting design issue in roguelikes regardless of which backtracking rules apply.

Without backtracking, players are stuck with dealing with whatever they encounter on the other side, though hopefully have tools for managing sudden difficult situations, such as immediately teleporting away, or perhaps specifically preparing for a potential ambush before entering.

In Zorbus, blinking away is a common strategy for escaping dire threats. Cogmind doesn’t have easy/unlimited teleporting, but also has the spawn protection rules to avoid issues in many areas, and where those don’t apply, a player might indeed decide to enter prepared for a close-range ambush, like with a launcher at the ready :P

cogmind_cave_ambush_obliteration

In most cases I feel safer entering caves with a launcher out to blast any group loitering on the other side. (It’s less of an issue for some builds, though, or if traveling with allies.)

With backtracking, developers have the unfortunate task of addressing “stair dancing,” or repeatedly using stairs as an easy escape option, even as part of localized combat tactics. Do enemies follow through stairs? How far? What else do they do if they see a player leave but don’t follow?

Various solutions, or pieces of a solution, include:

  • Nearby enemies can follow via stairs, for example in DCSS and Caves of Qud, but in games that do this there’s always the problem of just how far away will enemies follow from? It’s often still optimal if you can use this tactic to split them up, or at least temporarily break LOS to some while fighting others. Qud has an interesting addition here where you can actually use the stairs then stand on them to fight enemies that are coming one-by-one, but it’s blind combat and you can’t see which one you’re attacking.
  • Attach a resource cost to reusing stairs. For example drain stamina so the player is at an immediate tactical disadvantage after doing it, should enemies follow. Or using stairs takes more game time, further advancing whatever food/other types of clocks the game employs.
  • Reusing stairs first gives nearby enemies free attacks of opportunity.
  • Enemies that saw the player reuse the stairs wait nearby, then get the initiative/first strike on the player’s return.
  • Teleport players after going back through stairs (a possibility in DCSS variant “bcrawl“).
  • Make reusing stairs impossible while in combat (some TGGW stairs are called “twisted stairs” and behave this way, while others are normal, so traveling down the former might be more dangerous).
  • Design such that stair dancing is meaningless. For example it was originally an optimal tactic in Tangledeep, but the developer later changed it so that all monsters heal fully heal when the player leaves, but the player doesn’t have passive regeneration.

Anyway, stair dancing is definitely high on the list of issues a developer wants to consider if backtracking is a thing. My own DCSS play and stair dancing experience (circa 2010) was a strong influence on Cogmind, in that it was the whole reason I decided I didn’t want backtracking at all, despite the other advantages of making that choice which I later came to appreciate (Cogmind was originally a 2012 7DRL, so the scope wasn’t imagined to be anywhere near what it eventually became--there were far fewer considerations then :P).

Design Control

For several reasons already touched on, removing backtracking affords tighter control over progression and mechanical design since map transitions serve as a hard cutoff, turning individual maps into more isolated units. Expanding on that, the designer now also has reliable points at which to determine specifically what the player has and has not done by then, a fact that won’t change going forward. While roguelikes of the hack-n-slash variety (uh, lots of them xD) maybe don’t care so much about this aspect, there are definitely some greater benefits to be had among modern games branching out beyond that style.

Being able to refer back to an entire immutable history of player interactions with prior maps and their content, developers are able to more easily build sturdy plot lines that are harder to disrupt, for example. In open-world CRPGs where you have plot and quests, I imagine many of you have had the experience of breaking them one way or another :P

I’ve written a lot about “Weaving Narratives into Procedural Worlds” before, and it would be vastly more work to achieve the same results if backtracking were possible, simply due a ridiculously large expanding web of possibilities. If you can visit NPCs in any order, or revisit earlier locations after later events have occurred, each new connection and route ideally needs to be accounted for, or risk feeling like a loose end. Alternatively, you could explicitly block the player from doing many of these disruptive things, which is less immersive, so we’re essentially trading in a potentially gamier “no backtracking” rule in order to ensure we can create more realistic interactions throughout the world, covering more of those bases in a satisfactory manner.

In cogmind the web of possibilities is already increasingly complex the further the player reaches, and that’s assuming players cannot revisit earlier areas. To demonstrate, below is an abstract visualization of Cogmind’s potential plot-related encounters with major NPCs. The game begins at the left, and progresses to a win at the far side. The story is tightly integrated into the gameplay, and many of these encounters have implications for later encounters, for the player, or for the world in general.

cogmind_major_NPC_encounter_visualization_longterm_impact_2022

Major NPCs, colored by faction, showing those with a direct effect on some later encounter (arrows), as well as those with a relatively significant long-term impact on gameplay (bracketed length). And that’s just the major ones :P

Now for small-scale quests or one-off minor NPCs, backwards travel is not a big deal, but for anything on a grander scale, the control afforded by forcing the player forward keeps the amount of work required to a sane level. It’s certainly still doable, after all there are open-world roguelikes, but it somewhat limits the types of interconnected events and content you can add, or the level of detail added to each one, unless there’s enough dev resources to account for and build all the unique permutations, or simply have those possibilities take a more generic form (i.e. integrate them into generic faction-based systems and revolve more around dynamic relationships rather than building a compounding handcrafted story).

As far as story goes there’s definitely something to be said for allowing the player to revisit an earlier location and find a new experience there, but I’m willing to sacrifice that possibility for all the other benefits.

In Cogmind I can safely introduce extreme changes to the player’s capabilities or relationships without having to worry about the implications on earlier areas (of which there would be many, making it really hard or in some cases impossible to implement a number of my ideas :P). Also because Cogmind has a branching world structure in which we know that not all branches will be visited, the player is forced to make permanent choices about where they will travel for benefits (or challenges) XYZ down the road. Linear dungeons don’t need to consider this sort of thing, but it’s quite important for branching dungeons, where without backtracking we’ve suddenly built a new layer of design control directly into the world structure itself.

Sample Cogmind world map, in which the player can choose their route but only move upward or sideways to a new map. (This version excludes a number of spoiler areas, especially towards the end--a full-size version and more info can be found at the beginning of my series on spicing up Cogmind’s primary maps.)

Compare to DCSS, which also has a branching structure but allows backtracking, meaning players instead have a range of non-mutually exclusive options to combine, or return to later if desired. More freedom for the player, less control for the dev. Not that strong controls are necessary, of course--it’s built with this level of open-ended freedom in mind.

dcss_dungeon_map

A DCSS dungeon map linked from the wiki. It’s fairly old since it’s from version 0.19 (2016!), but it gets the point across (open image for full size).

Meta Complexity

On a larger scale, new maps serving as a cutoff point also allow players to repeatedly unload some previous content from memory. It’s just their current state and resources, and the path forward--less about traveling back and forth, and more about exploring the unknown, which in turn happens to be more in the roguelike spirit (says me :P) (but think about it!).

Backtracking and the implication that an optimal player probably needs to be keeping as much useful run background info in their mind might add yet more overhead, especially if one stops playing for a while and resumes a run in a later session--in some cases it’s much easier to pick up and continue an unfinished run in a roguelike that doesn’t have backtracking since you just check your character info and take a look at the map (where you may have even efficiently stopped right at a transition point).

Roguelikes with backtracking, especially those that don’t play out in a linear dungeon, also add a greater amount of navigational overhead that developers will ideally optimize away through good QoL features. Again looking at DCSS, you have a way to quickly perform multifloor searches for locations of matching known objects in order to autotravel to them:

dcss_search_result

Auto-travel in DCSS to facilitate what would otherwise require players to have a much better memory, or take notes :)

Of course a roguelike player isn’t usually one to shy away from complexity, but the more you can streamline the process of getting to the fun decision-making parts of a game the better.

tggw_seen_dungeon_features_list

TGGW is a linear dungeon, but backtracking to visit certain dungeon features is quite useful at times, so it also includes a convenient map list accompanied by the characters for notable features at that depth--NPCs, stairs, teleporters, mechanical valves, terrain that might contain something… (there is also a key elsewhere on the UI)

Architecture

As we’ve seen there’s a good bit of design overhead for allowing backtracking, and this comes with additional architecture costs as well.

In terms of disk/memory footprint, in the modern day it’s no problem to store lots of old map data for potential reuse, though perhaps these considerations played some role in the decision behind always generating new maps in the earliest classics (Rogue/Moria). Naturally there’s also then the need to be able to reuse that data, which requires more supporting code.

There also might be a need for partial simulation of other maps, for example in order to enable methods to combat stair dancing, or add more realistic behavior, plus of course building any additional systems to support backtracking, be they mechanics-related or for the interface.

Basically: Doing backtracking right is going to require more work under the hood compared to just forgetting about the past :P

Addendum: Intramap Backtracking

So what I really wanted to cover in this article is backtracking to previous maps, since that’s usually what people tend to have questions about, or opinions on, in our community dev discussions. Backtracking in terms of “revisiting local areas on the same map,” however, doesn’t seem to get nearly as much discussion. Since it’s a somewhat related concept and worth taking into consideration during map design, I’ll add a few notes about it here.

Some amount of backtracking in this sense is inevitable for tactical reasons (retreeaat!!!), or even strategic ones (returning to face a previously discovered challenge after preparing, visiting a local stash, etc.), though absent of player-initiated reasons to backtrack, it’s nice to be able to leave it as a mostly optional part of dungeon navigation, especially in roguelikes with larger maps.

In other words, ideally the player isn’t experiencing too much “well I’ve fully explored this section of the map, time to trek all the way back to a junction to find other new areas.” The larger the map, the more relevant this issue becomes, so I’ve definitely taken this idea to heart given that Cogmind basically has the largest maps among non-open world roguelikes :P

For this reason I like to make sure there are enough looping paths providing alternative routes to reach different areas, meaning fewer dead ends. This helps cut down on backtracking and is more likely to offer new encounters rather than having to revisit cleared/now empty space, should the player choose to continue exploring forward. Retreading old ground is generally a boring part of a roguelike, and I prefer to keep the focus on exploration.

cogmind_cavegen_analyzed

An old demonstration put together for one of my cave generation articles, with separate overlays showing both the general flow of the map and the loopable routes contained within, making it easier for the player to do more exploring than backtracking, even when traveling in a general direction (e.g. from one side of the map to the other).

As with freely backtracking to earlier maps, local backtracking can, however, be facilitated through QoL features to help mitigate the downsides.

Some roguelikes rely on autoexplore, which cuts down on the negative impact of empty space (both backwards and forwards!). Similar movement-enhancing features include “running” (commands to move in a single direction until an obstacle is hit), or even simply selecting a destination and automatically pathfinding to it, which is clearly pretty effective at unwinding a recent detour to return to a main path, or directly approach unexplored areas elsewhere.

tggw_shift_running

Exploring a TGGW dungeon with the help of shift-modified movement keys, which will continue in a given direction until stopped/reach something interesting/see something dangerous, and even follow corridors.

Personally I feel that using the mouse to click some faraway spot to return from a dead end has a good chance of interrupting the flow of exploration in some roguelikes, turning the map into a series of disjointed encounters, the relative locations of which don’t even matter anymore. This topic actually comes up a lot with respect to game design and autoexplore being an unfortunate band-aid.

But we can sorta do something about that if we want to! Wandering threats are a big help (especially combined with interwoven looping layouts :D). That passage that was cleared earlier might not be so clear on the next visit.

Cogmind has an easier time taking this to the extreme since it’s more of a living world than the typical roguelike, filled with lots of actors which means lots of potential encounters shifting around, sometimes across great distances. Some actors may leave the map, other new ones may come in… It’s a busy place, and the macro strategic environment combined with various clocks trying to push you forward mean that autoexplore is both wasteful and dangerous, which I think is a good sign in roguelike design.

cogmind_AI_general_movement

A bunch of actors (colored by category) doing their thing on one section of a map in Cogmind, and this is without player interference or other events, which might mix things up and lead to yet more variety.

Earlier I mentioned QoL’s role in mitigating some of the potential negatives of backtracking, and yet another area for it to shine here is with features such as item searching and other memory aids.

To that end I added item searching and filtering to Cogmind a couple years back, and it is pretty glorious when you need it.

cogmind_item_search_ui_demo_filters

In Cogmind filtering known items by name and/or other criteria, to highlight them on the map and path there.

Zorbus’ item search and filter interface is similarly cool, a nice implementation that also includes a closeup of the selected item and its surroundings, as well as a path to it.

zorbus_item_search_filter_sample

Zorbus item search UI in action.

Anyway, backtracking in the intramap sense is almost universally found to some degree or another in a roguelike. The real question is whether you’re going to allow players to visit old maps again, and get the most out of taking whichever approach you decide on :)

Posted in Design | Tagged , | Leave a comment

The Scrap Engine

Last time I wrote about item variants and randomization in roguelikes, and how Cogmind is purely based on a large set of static items, but more recently I’ve been running an experiment to play with not-so-static items. The entire mechanic revolves around a single new utility: the Scrap Engine.

Cogmind ASCII Art: Scrap Engine

A new utility is born.

The Scrap Engine operates like the Field Recycling Unit in that in addition to the normal inactive and active states it can also be cycled to COLLECT mode, during which it will “eat” items at the current location. These items are presumed to be disassembled and added to the Engine’s resources in order to be mixed with others and reassembled into new “constructs,” the name for a new category of randomized items. Instead of creating new ones it can also use these resources to modify existing constructs. Although in both cases the results are indeed based on the inputs, the process is not deterministic, so it’s not a pure “crafting” mechanic in that sense.

Constructs can be power sources, propulsion, or weapons. Utilities are generally defined almost exclusively by their effect and its degree, and due to the architecture (that again!) cannot even combine effects (this one is most definitely impossible in Cogmind, unlike the workarounds that enabled randomizable item stats without too much trouble), so no utility constructs, but in the end this is probably for the better due to number of other reasons I won’t get into here.

I was really unsure any of this would work at all, since internally it’s quite complex and therefore hard to gauge what outcomes are possible and whether they’d really fit into Cogmind, which has a pretty strong focus on design balance. In fact, I was unsure throughout the entirety of building the system, which made it rather challenging to work up the motivation to power through a lot of what needed to be done (I normally need to see a clear goal to help with that!).

As with building any complex system, I took the safer route of starting simple, using power constructs as a first test case since they involve the smallest number of variables. Of course that might make them a little less representative of the kind of system we’d need later, and therefore require more changes down the road (spoiler alert: it did :P), but at least it would be easier to wrap my head around this crazy feature while working on the building blocks.

Creating a construct and modifying one are two rather different processes.

Construct Creation

Construct creation requires multiple unique items as input, which is both more interesting and makes more sense since we’re trying to create something new but based on existing parts (which comes in handy as a baseline for proper balance!).

The first iteration simply averaged together the stats of all the input items. This might seem deterministic, though wasn’t necessarily easy to control since the Scrap Engine requires multiple different items to be loaded as resources, but might only use some of those to create a new construct.

Still, simply averaging stats could be more predictable than I wanted, not to mention generated less interesting results by creating items which were basically “neither this nor that” without much chance for real unique qualities that stand out, so I later changed this process to also have a chance to completely ignore a particular input source for the purposes of a single stat calculation.

Cogmind Power Construct Creation Sample

An example of a new power source created when the Scrap Engine combined a Reinforced Fission Core with a Hybrid Antimatter Reactor, showing the stats of both items alongside those of the resulting construct. Mass, integrity and heat generation values are more or less averages, but fortunately here the hybrid power’s lower energy supply did not factor in, while the total storage capacity was increased.

As you can see it also generates a new name for the item, which can be fun and sort of hint at where it came from, or in some cases its functionality. More on naming later.

Construct Modification

Despite the added randomization, new constructs are not going to be amazingly unique items, for sure, or where the system shines. Modifying constructs is where things start to get crazy.

Like creation, modification generally requires having multiple unique input parts available among the Scrap Engine’s resources. However, the more varied results of modification stem from two primary factors:

  • Only some individual stats or properties are chosen to be modified, leaving others unchanged. This can result in much wilder combinations not seen in any of the handcrafted static items.
  • Having a greater number of slots occupied by constructs increases the power of buffs, and also decreases the effects of debuffs.
Cogmind Power Construct Mod Sample

Taking our “Antimatter-Fission Reactor” created before and modifying it with another mid-game reactor that has some significant benefits but also drawbacks to balance them ends up doing nothing to our construct but giving it a much better power supply rate without the drawbacks of the original (which itself has zero storage capacity and is rather heavy). Of course this “Fission-Heavy Reactor” could have turned out much worse if only the negatives were applied, or more middling if multiple stats were modified at once.

While eating certain items gives the player a decent amount of control over what to expect from an initial construct’s creation, that control is decidedly more limited during modification, which is where things get interesting. Controlling the general direction of modification is still possible, given experience with the system, but it’s an overall swingy process that can make a build quite powerful for a time, only to eventually become weaker later on.

Playing this somewhat chaotic style is akin to riding a wave of power, working to creatively survive the downturns to rise again and crush the opposition. In that way it’s actually quite similar to Cogmind’s general premise, losing parts only to rebuild and come back stronger, but for experienced players the troughs of those waves are not usually as deep due to superior tactics and strategy, whereas a construct-based play style will force most runs to ride those waves both deep and high.

Duct Tape Derelict Legs

No these things are totally not held together using duct tape, regardless of what duct tape Dave here says! (Sketch by Zyalin, a throwback to the old piece featuring a derelict perched atop giant makeshift legs.)

Multislot Constructs

To maintain balance, multislot items used to create or modify constructs have their stats divided by their number of slots, so their “multislotness” is not a property they can transfer normally. Instead, each time a construct is modified it has a chance to expand in size, with that chance falling the larger it grows.

In fact, power and propulsion constructs can only grow in order to increase their effectiveness--having more than one at a time is not possible. This was a very early decision in the design process when I realized that possessing too many unique constructs at once would lead to the same issues I described as potential negatives of having a randart-like system of numerous variables to be familiar with mixed with Cogmind’s gameplay of frequently changing parts.

It’d be fine if there were only a few such equipment slots, but in theory player builds will eventually top out at 12~15 construct slots, which is a lot of items with procedurally shifting stats to keep track of. Too many. Then there’s also the issue of having to ensure propulsion is of the same type for it to be usable simultaneously, which would be a lot crazier if they’re all individual constructs that are changing left and right, and there isn’t even control over which of them undergoes modification. (Hybrid propulsion styles are already possible through the construct system of stat merging, anyway, even if it’s just combined into a single construct.)

Basically there’s no reason to add all that extra complication, so multislot power and propulsion it is.

Cogmind Scrap Engine Construct Build Sample (Fast Tank)

Hm, fast and tanky?! This screenshot is from a recent run of mine plowing through Armory with a treaded exoskeleton moving at a good clip (84!) due to being boosted with a bunch of combat hover units.

Weapon constructs can expand, because multislot weapons are cool, but more than one is possible and even sometimes desirable, both for handling different scenarios and also to allow a construct build to tweak its weapons looking for better candidates to retain and improve (sometimes they can get so ineffective it might be smart to start one over?). Plus some tactics work better with numerous weapons.

Cogmind Weapon Construct Sample

This two-slot cannon construct carried me through a couple floors in my last stream. Five projectiles, all with respectable damage and 9% blast crit?! The main drawback is clearly the massive heat generation, which had me running multiple cooling systems and/or injectors, and still sometimes backing off from larger fights to cool down. But it sure shined when something needed to die fast, especially with a Kinecellerator attached :D

As usual the player can always choose to not evolve extra slots of a certain type, or use non-construct parts to block slots they don’t want constructs to use either for creation or expansion.

Construct-Related Mechanics

Aside from multislot expansion there are actually quite a few nuances to the design that were required to keep constructs fun and balanced…

  • As mentioned before, having more constructs results in better mods. This reflects the concept that all such parts are interconnected with the Scrap Engine and other constructs.
  • For that reason, removing (or even just losing) a construct also damages the Scrap Engine itself! This puts a cap on what could otherwise be a cycle of tedium by repeatedly eating items and modifying constructs seeking better results.
  • Fortunately the Scrap Engine can transform into an armored version of itself by eating armor (so there is a use for some utilities in here, after all!), and also repair itself by eating more armor in that state. This mechanic is vital since the entire build revolves around this utility so it needs to be maintained throughout an entire run! If the armored version is eventually “destroyed,” it reverts to the normal version, giving more opportunity to armor it up again.
Cogmind ASCII Art: Armored Scrap Engine

All armored up!

  • Constructs themselves can also be repaired, a side effect of any modification (35% of max integrity each time), and having constructs eventually take damage is inevitable, so construct evolution is in turn inevitable due to the repair/modification process. This reinforces the “chaotic wave of power” design described earlier.
  • Like the armored Scrap Engine reverting to its unarmored version, “destroyed” multislot constructs are not fully destroyed! Instead the construct loses a slot and turns into a smaller version of itself. This is an especially important factor with regard to power and propulsion constructs, which can only improve by growing, since otherwise there’s the chance to suddenly lose all propulsion at once and a need be ready for that at all times, a huge drain on resources. Cogmind part losses need to happen gradually so there is ample opportunity to recover or change tactics before the situation gets even worse.
Cogmind Weapon Construct Size Reduction Example (Log0

A powerful 3-slot cannon is shown here in the log being reduced to a 2-slot cannon, so you don’t completely lose your primary source of firepower that might have been carefully “crafted” over time. The replacement is somewhat damaged as well, but it’s better than being totally gone!

  • Constructs gain immunity to effects that can otherwise outright remove parts, such as severing or thievery, since good constructs are hard enough to build and maintain as is, so losing one in this way would be pretty devastating.
  • Construct weapons are also immune to misfires caused by system corruption, since that would be unnecessarily unfair since they can’t safely be removed in situations where misfiring would have potentially disastrous consequences.

Strategy

Having playtested this new mechanic for a while, I’ve found that it comes with many interesting new strategic considerations, a whole new play style which can be both fun and challenging in its own ways.

Like when to leave some slots empty for a chance to grow an existing construct, since in multislot form they gain a further bonus to their stats as per the normal rules of handcrafted multislot items to make up for their other drawbacks.

Or thinking about when and what to eat, when to create new constructs, or try to modify some, or hold off completely and have the Scrap Engine save its resources for later (leave it off), or even store some resources separately in inventory in order to feed it later as part of a lone batch.

There’s also the balancing of such a build’s constructs and the benefits they bring (especially in greater numbers) against the use of normal items, which are swappable… and predictable :P. How many slots to devote to utilities vs. construct-supporting slot types? The former don’t contribute to construct effectiveness, but are the most versatile slot and useful for any build. Also there’s the fact that the Scrap Engine itself occupies two of those utility slots.

Should one evolve or reserve an extra non-construct weapon slot for swapping potential? On that note, one aspect not yet mentioned is that weapon constructs are only built from guns and cannons, thus excluding launchers and special or melee weapons. The latter categories are excluded from the construct system for having too few relevant variables or results that wouldn’t balance properly, but as normal parts they can still be quite useful during most runs so leaving room for swapping one in might be important depending on strategy or preference.

QoL/UI Features

Any big new feature is likely to need some UI love, so for proper testing including game feel and convenience I added a few new relevant interface bits.

One useful behavior is to highlight all edible items while the Scrap Engine is in COLLECT mode by intermittently blinking them white.

Cogmind Scrap Engine Edible Item Highlighting

Highlighting visible construct resources while collecting them with the Scrap Engine.

Technically the set of valid targets is a consistent subset of item types, so given time the player will know what they can and cannot collect, but this feature helps learn applicable targets to begin with, and being able to parse the visible map to see all such items at a glance also comes in handy when there are many items scattered about.

One of the more typical but important parts of any new feature is audio feedback, so I added a range of sound effects (in some cases more than one for additional variation since they’ll be repeated a lot) for collecting items, creating constructs, and modifying them. Sure there’s the log messages recording these events, but the audio for a log message is not specific to a given action, so for important actions it’s nice to have unique sound effects for extra reinforcement.

At this time I realized the Field Recycling Unit had been relying purely on the message log to report item collection, so while at it I also added a sound effect for that one so it stands out when you leave it on and it chomps down on that really nice item that was sitting on the floor just the previous turn ;)

The most important supporting UI feature was something I didn’t even plan to implement at first, to add to the “mystery factor” (at least in test builds, where the Scrap Engine was originally code named the Mystery Engine :P). The idea was to not have any built-in way to know what items had been eaten so far, and therefore not really be sure what resources were currently or still available to the Scrap Engine when turned on. But players could (and would) make note of things they were eating if I didn’t find a suitable way to include this in the UI, and if we’re including it we may as well reveal what actually remains, since obviously the contents have a bearing on the potential results, and it’s nicer to at least have some basis for planning with what is already a chaotic mechanic.

Cogmind Scrap Engine Content List Sample

Behold, the contents of the Scrap Engine revealed!

The Scrap Engine inventory temporarily appears any time its content changes, e.g. due to item collection or using some to create or modify a construct, and also whenever the Scrap Engine is toggled to COLLECT mode, making that a manual method to force it to appear. There’s a new config setting to adjust the duration it remains visible each time it appears, or turn it off completely.

(I’m sure some players might want this particular window to be something persistent and separately toggleable, but as an item-specific mechanic I’d prefer to keep it automatic if possible, especially since the list can often be rather long and the only place to fit it is over the map view.)

Through observation the list can also be used to learn that the Scrap Engine will only hold up to ten items worth of resources (i.e. ten items) of a given type before collecting new ones starts to replace old ones in first-in-first-out priority. So with enough collection it’s also possible to avoid using the contents and instead replace old items with better new ones if desired. More strategy! This could come into play if for example a lot of low-quality items were picked up during an emergency but ended up not being necessary, or a good construct build was simply maintained for so long that other items originally collected around the same time have already been outclassed by newly available ones.

Construct Naming

While it may seem to be of secondary importance, in fact part of my original drive to make this whole concept work was the potential I saw in creative naming possibilities. I had hoped that the naming of constructs could feel as cool as the names generated by Cogmind’s seed system, a random mashup of item names resulting in some really evocative stuff. “ReactiveArmageddonRifle,” “HypercooledWeaponHammer,” “GodChainStabilizer,” “AerolevSuspensionInjector,” “TacticalProtonAccelerator…” I want to use one of those!

Alas, we’re not quite going to get that level of cool out of construct names, as I’ll explain below, but I do think they’ll be pretty fun. I actually ended up using a somewhat different naming scheme for each type of construct, depending on their needs…

Having started with power constructs as a test case, and being inspired by the seed generation system in the first place, the underlying naming system for these was built in the same manner, breaking apart names of constituent items and merging them to create a new name.

Of course we’re going to need a suffix to represent the type (engine/core/reactor), and also have to obey overall item name length limits so it fits in various UI locations while also being reasonable to read, so I decided to stick with only up to two words pulled from source items. For example a Nuclear Core and Deuterium Engine could combine to create a Nuclear-Deuterium Engine; later modifying it with various Ion Engines could randomly replace “Deuterium” with “Ion” to create a Nuclear-Ion Engine construct. Overall it’s nice for the construct names to reflect what items went into their creation/modification.

In the case where source items are all variants of the same class of power source, such as many Ion engines, instead of the result being an Ion-Ion Engine, which is pretty weird, the naming process would convert it to “Multi-Ion Engine.”

The only other special case for power constructs is the addition of a “Cld.” (cooled) prefix if overloadable, so that the name itself carries this useful piece of information like it generally does for normal power sources. This is an important reason we can’t really have crazy construct names--we’re going to need that space to include meaningful info! (unlike the seeds, which are pure fun and often nonsensical)

Cogmind Construct Naming Sample: Power

An overloaded Multi-Particle Reactor in the parts list. You can also see the ‘&’ character in front of its reference letter, as a reminder that it’s a construct and cannot be removed (akin to the ‘:’ character for processor-like parts, but here an even more special case).

This naming approach was satisfactory for power sources, but the propulsion situation adds new complications.

Right away I decided that all propulsion constructs are dubbed “exoskeletons,” a term generic enough that it can theoretically refer to any form of movement (while sounding cool!), and the actual type of movement appears as a prefix at the beginning, e.g. Flying/Hovering/etc, since we do need that info to be obvious from the name. This gives us the naming format “[type] [unique] Exoskeleton,” where [type] is excluded if legged (kinda the default form of an exoskeleton).

As for the [unique] part of the name, propulsion unfortunately could not make effective use of the seed-like “break down and recombine names” approach. There are too many propulsion items containing either no useful words, or only words that that aren’t reasonably compatible with this system insofar as it’s used to build constructs. So I had to design an alternative for that component, and decided I’d just specify applicable words manually. For example Arm. Treads can contribute the word “Armored,” and Hvy. Siege Treads can contribute the word “Siege.”

(I originally preferred the seed-like system’s method, because it’s dynamic, and once coded shouldn’t require any more attention to content since it will automatically include names from new items as they are added and used--basically less data to work with and worry about, but having a good final result is of course more important, and it’s not like tons of items are being added all the time anyway.)

Propulsion construct names don’t use “Multi-” like power sources do. If duplicate words are all that’s available from the given sources, the name will just leave it at a single word, rather than inserting any kind of hyphenated solution.

Cogmind Construct Naming Sample: Propulsion

This Hovering Siege-Myomer Exoskeleton is pretty fast for its support. Maybe it has other drawbacks… or maybe not!

Note that in some rare cases it’s theoretically possible to fail at assigning a name to a given construct from its source material, in which case it’ll just be called a “Power Construct” or “Construct Exoskeleton,” though additional modifications will eventually rename it.

Weapon constructs have an even more involved naming scheme, being the most complex of the constructs and therefore ideally conveying even more relevant info through their name. The format: [optional prefix] [damage type] [unique] Construct/[G/C].

Construct/C would be a cannon, /G a gun, referring to their type since even though gun constructs can technically become even more powerful than cannons, the difference can have a bearing on at least some mechanics like gunslinging, knockback, and blasting matter off targets.

Again because many weapon names include words that can’t be effectively detected by an automated system, I used the new data option added for propulsion to manually define associated words where applicable, so that’s where [unique] comes from, pulling only one random word to use there since we often don’t really have room for more. The pool of relevant words to choose from is actually weighted by the rating of their source items, and limited to using only those which match the resulting construct’s damage type, altogether an attempt to increase the relevance of a choice while still allowing for some outliers.

I thought it’d be a good idea to reference the damage type in the weapon name itself, but didn’t want to be too repetitive about it, so instead use a list of words related to a given damage type, and pull randomly from that. So an EM weapon might directly insert “EM” for that section, or instead use “Charged” or others.

The prefix at the beginning of a name is optional, but special characteristics of many normal weapons in Cogmind are reflected via a prefix, so I think doing the same with constructs is a good idea. They’re helpful, could be cool, and don’t take up too much space since they’re all abbreviated.

These are assigned whenever there’s some aspect of the weapon that stands out, ranking all potential prefixes that reflect properties which meet a minimum threshold, similar to the point system used by the build classification system first described here, but applied instead to common weapon prefixes.

So a weapon gets a certain number of points towards the Precision prefix based on its positive targeting modifier (if any), compared to points towards Hypervelocity earned via penetration, and so on. Some prefixes sound like they could be based on relative values, for example “High-powered,” in which case its degree is determined by weighing it vs. the average damage of all other other non-construct weapons of the same damage type.

Regardless of degree, certain properties override all other prefixes since they reflect important core behavior: these include guided and spread (arc) weapons, and any that fire multiple projectiles.

Cogmind Construct Naming Sample: Weapons

Deadly construct weapons! Construct builds overall feel somewhat weaker and less reliable early on, but get progressively stronger into the late game as long as they can be maintained.

Into Beta 12

This has been a pretty huge detour from the main plans for Beta 12, though at least it’s looking increasingly likely this could actually work?

I don’t have any hard player data with respect to this new mechanic since none was included in the scoresheet yet, but the initial idea was to get anecdotal feedback anyway--details and more nuanced balance changes could come later once this feature is established.

For a while it felt like this might end up reserved for some weird special event mode where it’s forced on the player with slightly different rules, though after seeing others toy with it, and playing with it myself, I’m getting more confident there could be a place in Cogmind’s next version to include the Scrap Engine (in terms of design, that is, because lore is actually where it first came up anyway so fitting it in there isn’t an issue). There’s still a need to see people using it in a wider range of scenarios, which I’m sure I’ll see in the meantime while working on other parts of Beta 12.

In any case, building new construct combinations, and dealing with the consequences one way or another, has been a fun experience.

I’ve streamed some construct build playthroughs of my own, in which I talk about the design and strategy while testing it out in actual runs. The first is here:

Posted in Mechanics | Tagged , | 2 Responses