Kerkerkruip 2 - Design Talk

I’ve got another topic in which I ask coding questions; here, I would like to talk about design principles and choices for Kerkerkruip and its potential successor, Kerkerkruip 2. In part because it might be interesting to players and to other authors. And in part because your ideas and feedback are valuable, and of course all the more so at an early stage of development.

In this post, I want to share some core ideas behind the combat system.

Traditionally, combat systems in interactive fiction have been rather boring affairs. You type ‘attack’, there’s a random chance that you hit and do damage; then your enemy does the same; and so on. Of course there are ways to make it work. For instance, Treasures of a Slaver’s Kingdom uses fights mostly as doors: you can pass enemy X if and only if you have solved enough puzzles to be able to beat them. The combat is not really a tactical system, because tactics are not the point. Or you can turn the combat into a series of hand-crafted puzzles, as in Slap that Fish. But for Kerkerkruip, I wanted a tactical combat system.

That means that in a fight, when you’re looking at the command prompt, there should be a real decision about what to type. It can’t just be ‘attack’ every time. I can think of at least three ways to make that happen.

The first, and worst, is a rock-paper-scissors type thing where you and your opponent make a choice simultaneously, and success depends on having chosen something that dominates your opponent’s choice. Of course rock-paper-scissors is not a good game. I think something similar is used in classic beat 'em up games like Street Fighter and Mortal Kombat, but I’m sure the need for real time reflexes and the psychological dimension of playing against another human are crucial to its success there. For interactive fiction, it doesn’t sound like a good idea.

The second approach is to give the player many different skills to choose from. In order to make sure the player doesn’t always just use the strongest one, you can for instance give them cooldown timers. Many contemporary action RPGs work like that, as do some turn-based games like TOME. Another option is to make the strongest skills use a renewable resource, such as ‘mana’ or ‘energy’, as we see in for instance Diablo and Dungeon Crawl: Stone Soup. It’s also common to combine these two forms of limitation. I think this can work in an interactive fiction, although you’d need to think carefully about ensuring that the player shouldn’t always do the same things in the same order. In many, perhaps all, of the games mentioned above the spatial situation is important in determining what you’re going to do. (Are the enemies close or far away, lined up or spread out, and so on.) In an IF tactical combat game, you probably do not want to rely on space too much. Still, I think it could be fruitful to explore this approach – it’s just not what I chose for Kerkerkruip.

What I did choose was something very simple: a system where you can choose between attacking and another action, called concentrating, which improves your future attack. Now there is a choice between attacking right now, possibly getting the benefit of that; or improving your future attack. Before looking at the details of Kerkerkruip, let’s define a simple two-player game.

Every player starts at stage 1. You take turns. On your turn, you can either increase your stage by 1, to a maximum of 6; or throw a 6-sided die. If you throw the die, then (a) if you throw the number of your stage or lower, you get as many point as the stage your are at; and (b) your stage is reset to 1. So, if you are currently at stage 1, you have a 1 in 6 chance of getting 1 point. If you are currently at stage 6, you have a 6 in 6 chance of getting 6 points.

This game gives you the opportunity between possibly scoring points now, or improving your ability to score points later. A quick mental calculation will tell us that you should always improve your stage 5 times until you’re at stage 6, then roll the die. This gives you 6 points every 6 turns. All other strategies are less efficient.

But it’s easy to make this game more interesting by adding interaction between the players:

Whenever you score points, your opponent’s stage is reset to 1.

Now it becomes very risky to try to get to a high stage, because all those turns getting to a higher stage are wasted as soon as your opponent scores a point! Suppose you are both at stage 5. Then you definitely should not go to stage 6, because your opponent might roll the die and have a 5 in 6 chance of disrupting you. What is the optimal strategy for this game? It’s hard to say without much more detailed calculations. Calculations that will become harder still if we introduce the rule

You win when your total points is 10 or higher.

because now, the optimal strategy is going to depend on how far along both you and your opponent are in achieving that goal. I’m not claiming that what we have defined is a great game, but (a) it is far from trivial to see what the right thing to do is, (b) it is nevertheless possible to reason about that in the thick of things and come to pretty good conclusions, and (c) it’s going to be tense! You’ll be watching every die roll eagerly, hoping to score some points and trip up your opponent!

What’s more, (d) the optimal choices will change when small changes are made to the situational rules. An opponent against which you always gain 1 point less than you normally would, or 1 point more; an opponent who succeeds more easily at the roll, but gains fewer points; an opponent who is disrupted only when you succeed at your roll but don’t throw a 1; and so on… each of those would require a rethink of your tactics. In each case, the situation is tractable enough that you can make informed decisions, but opaque enough that you don’t know for certain what the optimal strategy is. You need to hone your decision making skills through frequent experience.

Essentially, this is what Kerkerkruip’s attack/concentrate system is. The details are a bit different from the simple game above, but the underlying principles are the same. You want to get to high concentration for a much better attack, but you don’t want to be hit in the meantime, since that might disrupt your concentration. More about the details, and about the ‘reaction’ and ‘flow’ additions, in a future post.

13 Likes

I played Kerkerkruip years ago and have vaguely fond memories of it, though I found the combat system hard to wrap my head around and could never figure out how to win. At some point I did stumble into a guide, but by then I’d grown tired of banging my head against it and didn’t feel like trying the guide’s advice. Still, I enjoyed my time with it, and would play a sequel if it came out. Roguelikes are meant to be hard, after all. Being nigh-impossible to win is a draw of the genre to me.

I’m curious what you think of Pokemon’s combat system, since it’s incredibly popular but falls into the rock-paper-scissors pattern described negatively in your post. They added a bunch of complications to it to make it more interesting, of course. Also, have you ever played PokeRogue? It’s a trendy browser-playable Pokemon roguelike. I’ve sunk a good number of hours into it, and to this day I still try the daily runs sometimes, inevitably losing over and over to a stupid series of short-sighted decisions until I give up or the clock rolls over to the next day and the daily run expires.

2 Likes

One of my goals with Kerkerkruip 2 will be to make it more approachable. I think a tutorial could already help rather immensely, to be honest; but I’d also like tactically important information to be more easily accessible.

I’ve played the Pokemon card game only a little, little bit with my son. It seemed very boring compared to Magic, but perhaps we were just not playing it right or did not have the right types of deck. I haven’t played any of the computer games, so I don’t know about them!

A tutorial would be fantastic. The original Kerkerkruip was a bit light on the tutorial side, if I remember right, so there was a steep learning curve.

The Pokemon card game is actually completely different gameplay-wise from the actual video game; the two combat systems aren’t remotely similar besides the branding. I’ve never played either the Pokemon card game or MTG, though I had a friend who tried to teach me MTG in high school, for about half an hour, before we got distracted and gave up.

The Pokemon videogame combat system is essentially super mega rock-paper-scissors: traditionally it’s a 1v1 where each player has up to 6 pokemon, each pokemon has up to 4 moves, and each player has 1 pokemon on the battlefield at any given time.

At any point, your choices are to have the pokemon you have on the battlefield use one of its 4 moves, or to switch out to one of your other 5 (or less) pokemon, which will take up your turn. Each player makes their decisions for a turn simultaneously and doesn’t know which decision the opponent has made until the results of the turn are visible.

Pokemon have up to 2 types, and each move has a type, which doesn’t have to be one of the pokemon’s types. A move of type X does 2x damage to pokemon with types that X is super effective against, while doing 0.5x or even 0x damage to pokemon with types that X is ineffective against. So the combat system is essentially guessing which attack the opponent will use, or which pokemon they’ll switch in.

Additionally, an attack is either physical or special; physical attacks do less damage to pokemon with a high physical defense, while special attacks do less damage to pokemon with a high special defense. All this needs to be taken into calculation when deciding what to do next.

Moves can be more than just attacking, and have all kinds of effects. Stat boosting moves are common, and certain pokemon are “sweepers” who can, for example, double their physical attack, special attack, and speed in one turn. After that, they can tear through an opponent’s team if the opponent has no counters that resist all of the sweeper’s attacks.

There’s a lot of memorization involved, since you need to know the types of each pokemon, its stats, its moves, which moves it commonly uses, and so on. Don’t even get me started on the doubles format, where each player has two pokemon on the field at a time instead of one, or on other random crap like abilities, dynamaxing, tera, and whatever Gamefreak keeps throwing into the next generation. I don’t play actual Pokemon games anymore, just the online browser versions.

People who want to get an idea of what competitive Pokemon looks like can skim pages on Smogon, the premier English-language guide to competitive Pokemon battling, though they are somewhat incomprehensible if you’re unfamiliar with Pokemon. This guide to random battles, a 1v1 PvP format on play.pokemonshowdown.com where each player gets a randomly selected team of 6 instead of making their own team, is an example of one such wiki page.

The gameplay of Pokemon is very different from Kerkerkruip. I think where Kerkerkruip had randomness as an essential component of the gameplay, the randomness in Pokemon actually hampers the competitive gameplay, because most of it is pure strategy and doesn’t use random chance at all, until it does. Nothing like losing a battle because you missed a move with a 95% chance to hit, when you otherwise would have won. I’ve spent an unholy amount of time playing competitive Pokemon, so this has happened to me more than I can count.

[Edit to add: I’m defending the rock-paper-scissors style of combat in part because I’m kicking around a Pokemon-like myself, and I think Pokemon makes it work really well.]

4 Likes

For IF in general—albeit probably not Kerkerkruip—could you not use story as an incentive? That is, branch based on the rough pattern of attacks used so that if the player wants to see all of the story, then they have a motivation to not rely on just the strongest attacks across all playthroughs.

1 Like

Fascinating idea. It could work really well. Reminds me of a review of Undertale I read, where the reviewer notes how different it was from normal branching-plot RPGs in that most of the meaningful decisions the player makes to affect the plot, involving who to kill and who to spare, take place inside the combat system, while most of the choices outside the combat system that normally matter, like dialogue, are laughably irrelevant.

For example, you can compliment Papyrus or say something awfully rude to him after sparing him, but he’ll agree to be your friend regardless, and even interpret your insult towards him as a self-deprecating statement about yourself. It’s because you’ve already demonstrated your lack of hostile intent by refusing to hurt him where it mattered, so your words are irrelevant in comparison. There are exceptions to this rule, but it’s generally applicable.

I’d be interested in a work of IF that does something similar, but the main issue with basing story branches on sequences of combat moves is that there’s a potentially infinite sequence of combat moves in most battle systems, so you’d have to account for that somehow. I think most RPGs tie it to using specific moves, like the tadpole powers in Baldur’s Gate 3 that affect your story choices if you overuse them, or to the results of the combat, like in Undertale. I don’t know if there are other ways that would also work with a strategically complex combat system. I think Fire Emblem may also do this, where the story changes based on who lives and dies in each battle, but I’ve never played it.

2 Likes

I think I only really played four or five rounds of Kerkerkruip: just until my first win. But my feeling was that the combat itself was pretty trivial and there was generally an obvious right thing to do, and that the interesting thing was the larger game of learning the enemies’ patterns, learning what the other items and spells did, etc. (in order to learn enough information to be able to see what the “obvious right thing” was)…

1 Like

I was a big fan of Kerkerkruip in the past. In fact, I’ve always wanted to make a roguelike/RPG like it. The way it handled things, I thought, was very interesting. The thought of a steampunk/magipunk setting where alchemy, grenades, fantasy cocaine, magical machines that would make even Dumbledore blush… I love it. I honestly wish I knew more about the world of Kerkerkruip, even if I did get the cliffsnotes, in a sense. The Tungausy are pseudo-native Americans, Aite is yet another blood god (Gruumsh, anyone?), Nomos was basically the Emperor from 40K (without the blood and weird magic stuff; that belongs to Chton and Aite), Sul is who every “hippy” druid in D&D wants to be, Chton is an amalgamation of various personifications of death. But why is all this here? Why would Malygris keep a temple to every known god/goddess in his dungeon? Wouldn’t that be antithetical to his goal, of making the player feel trapped, with no way out other than victory or death? How did these various figures (the marquis of Savon, Metastasio, the Blademaster) gain their reputation, and what is their connection to Kerkerkruip?

Also, which parts of the Kerkerkruip engine do I need to strip out to make it suitable to use as a foundation for my own game?

2 Likes

Yeah, I found it the same, but maybe I didn’t understand it well enough. IMO, repeatedly whacking each other until maybe you decide to run away is actually a pretty good combat system. So any attempt to get more complicated has a fairly high bar to clear, and the risk is that the additional friction of controlling a more complex game outweighs the additional richness. A fairly simple addition to just whacking each other can yield good results though, like a even a single spatial dimension, multiple party members, or a cards mechanic (in addition to the things that have already been mentioned). Worker placement, maybe? I haven’t seen that used in a combat system.

I do remember concentrate vs. attack vs. using some other ability being important, but it didn’t feel similar to action games like say, Nuclear Throne or Heat Signature in terms of making decisions on the fly during combat.

Hmm. Maybe Into the Breach is a better comparison, where there’s a lot of weight on the individual decisions and how they interact. Or Dream Quest? Kerkerkruip for me was more like “have you solved the puzzle of hohw this enemy behaves, and what tools do you have to deal with it? OK, you’re going to take this tactic,” and executing on that was straightforward to the point of “oops, I died because I wasn’t taking it seriously, so I missed something important in the barrage of text.”