Wednesday, May 22, 2013

Where do roguelikes get their tactical and strategic depth? Perhaps the most important mechanism is that of trade-offs between short term en long term advantages. Here's a simple example:

I'm facing a centaur in DCSS, and he has already damaged me heavily. Will I use my scroll of blinking to escape from him, or do I risk trying to kill him before he kills me?

Here, using the scroll of blinking will give me an advantage now: I'll escape from the centaur and I won't die. But not using it, if I survive the fight, gives me an advantage later: I'll still have the scroll of blinking, which is one of the best escape options in the game.

Of course, this is not the only kind of tactical/strategic choice that a roguelike player has to make. Another important category are choices between getting one of two advantages right now. Shall I wear a ring of poison resistance or a ring of negative energy resistance?

But the short versus long term trade-offs are arguably the more interesting and exciting, because you are constantly trying to decide how much risk you are willing and able to take right now. It's not a question of playing safe or not playing safe; it is a question of finding the exact right balance between playing too safe (and thus disadvantaging yourself at a later stage in the game) and not playing safe enough (which will make you not reach that later stage at all).

By making these trade-offs interesting, and by having them interact with each other, much tactical and strategic depth can be created. This is the basic design principle behind Kerkerkruip, which has been built around several sets of trade-offs. Let's talk about them; and since you may not have played the game, I will explain what is necessary.

Trade-off 1: Concentrating versus attacking

The two most basic combat actions in Kerkerkruip are attacking and concentrating. Attacking is advantageous right now: you might hit and damage your enemy, and that is after all your aim! If your attacker is concentrated, you might also break his concentration, thus ensuring that his next attack will be weaker than it would otherwise have been.

But concentration gives you an advantage later. There are three levels of concentration to be attained by concentrating several times in a row. The first gives a +2/+0 attack/damage bonus; the second a +4/+2 bonus; and the third a +8/+4 bonus. So if you concentrate more, your next attack will have a better chance of hitting and will deal more damage if it does hit

The basic rhythm of combat thus becomes a trade-off game, where you must constantly decide whether it is worth it to try to get the future advantage of higher concentration, or whether you should use what you've managed to build up for an advantage right now. The fact that you can lose concentration by being hit adds more tension.

Trade-off 2: consumables

Like most roguelikes, Kerkerkruip has consumables that you can either use to your advantage right now or save for later. Important instances are the fragmentation grenade (which will break the concentration of your enemies) and the scroll of teleportation (which will get you out of any fight, even in mid-blow).

Because this mechanic is so familiar, there is little need to explain it further.

Trade-off 3: ment and ment addiction

The player character in Kerkerkruip starts out with four items: a rapier, and three packages of ment. Ment is a drug that can be snorted in order to gain temporary combat advantages. These advantages increase as you become more dependent on the drug: the first time you snort ment, you get a +1 bonus on attack, defence, damage, body, mind, spirit, and damage resistance; but the second time this rises to +2; and the third time to +3. (Special items in the game can even take you to +6.)

To a certain extent, ment just functions as another consumable: use it now, and you won't be able to use it later. But ment has a special feaure, ment addiction. After you have used one package of ment, once the rush wears off, you will feel down and get a -1 penalty on attack, defence, body, mind and spirit. This penalty is permanent. The only way to get rid of it is by using more ment ... but of course, when that high has passed as well, you'll be left with a permanent -2 penalty. When used unwisely, you might have to face the final enemy with a permanent -3 penalty on your most important scores.

Ment is very powerful. It allows you to win fights you could not otherwise win. But you are paying for a short term advantage with a long term disadvantage -- unless, of course, winning this fight will give you anotherlong term advantage that outweighs the ment addiction.

Trade-off 4: powers

The central strategic aspect of Kerkerkruip is its systems of powers. The dungeon contains seven creatures with a level: two level 1 creatures, two level 2 creatures, one level 3 creature, one level 4 creature, and one level 5 creature. Defeating these creatures is vital because (a) killing a creature with a level is the only way you can heal; (b) killing such a creature will grant you its power.

A power consists of a special ability, and an increase in attack, defence and health. (And sometimes other advantages as well.) Powers of higher level creatures are better than powers of lower level creatures; but of course, these creatures are more difficult to defeat as well.

The essential feature of the system is this: absorbing a power will make you lose all powers of equal or lower level. So if you have a level 1 power and a level 3 power, and you kill a level 2 creature, you will lose the level 1 power. Killing a level 4 creature will make you lose all the powers you previously gained. (There is no level 5 power: killing the level 5 enemy makes you win the game.)

What this means is that it is always advantageous in the long term to kill the highest level creatures first, because that way you'll end up with most powers. But of course, it is advantageous in the short term to defeat low level creatures, because you have a better chance at winning those fight, and they empower you for future fights against tougher enemies. Your preferred sequence of kills might be 2-1-4-3-2-1 ... but will you survive a fight with a level 2 creature if you don't kill a level 1 creature first and absorb its power?

Here we also see how systems of trade-offs can interact. For maybe you can kill that higher level creature if you use ment to aid you. Perhaps the long term disadvantage of ment addiction is outweighed by the long term advantage of getting more powers; while the short term advantage of ment is enough to overcome the short term difficulties of fighting a high level monster before you've absorbed a lot of powers.

Trade-off 5: powers versus opportunities for healing

Furthermore, it is not necessarily a sound strategy to gather as many powers as you can right now. Suppose that you have defeated everything in the dungeon except for a level 1 creature and the level 5 final enemy, Malygris. You currently have a level 4 and a level 2 power. Should you kill that puny level 1 creature, gain its advantages, and attack Malygris in the best shape possible? Perhaps -- that would certainly be advantageous in the beginning of your fight.

But it might turn out that the best strategy is to leave that level 1 creature alive. For if the fight doesn't go the way you wanted it to, you could flee, kill the level 1 creature, and heal -- killing any creature will make you regain all your health. So there is a choice to be made between more power right now, or an opportunity for healing later.

Trade-off 6: blood magic

Kerkerkruip 8 introduces blood magic. Blood magic items are items that can be fed blood (health) in order to make them stronger.

Normally, health is more important than the advantages gained from using blood magic. However, Kerkerkruip's healing system heals you of all damage whenever you kill a monster. Suppose I have 35 of 40 health, and am about to kill a level 1 monster. I'll be back at maximum health after I do that, which means that in a sense, I have 34 health right now that I could as well spend on blood magic, because it'll be returned to me anyway. Not spending it on blood magic would be wasting an opportunity.

But of course, spending that health is not entirely without risks. Even a level 1 monster might get lucky and hit me; so if I spend too much of my health, I am increasing the risk of dying in this fight. I have to decide how to balance the short term advantage of having enough health to comfortably survive this fight with the long term advantage of empowering my blood magic items.

Trade-off 7: religion

Kerkerkruip 9 will introduce an entirely new religion system. In this system, the player can sacrifice powers she gained to one of several gods; these gods give advantages based on the total number of levels of powers the player has sacrificed.

These religious advantages will be considerable, but smaller than the advantages given by the powers themselves. So why sacrifice them? Because you will inevitably lose some of your powers anyway -- better to sacrifice them first! For instance, let's say that you have been fighting a level 4 enemy, and it is almost dead. You might want to retreat, sacrifice all of your powers (you're going to lose them anyway), then return and kill the enemy. But of course, the more powers you sacrifice, the bigger the probability that you won't be able to successfully finish the job and deal that last blow. So once again, you have to decide what is the right balance between the short term advantage of having enough strength to kill your enemy, and the long term advantage of divine favour.

Conclusion

I am, of course, biased, but it seems to me that Kerkerkruip has quite a bit of depth, and much of it is due to these interlocking systems of short term risks leading to long term advantages. It is, at the very least, a useful design pattern to keep in mind -- and one that you can build whole games out of!

I did* some Linux command line magic on the log files of my server, and it turns out that Kerkerkruip has been downloaded from 365 different IP addresses in the past two weeks. Not quite AAA status, but not too shabby either!

Saturday, May 11, 2013

The Kerkerkruip team is very pleased to release
version 8 of the interactive fiction roguelike Kerkerkruip! This release
brings some major interface changes, including:

Introductory movies.

A graphical main menu.

After you defeat a monster, it will be added to your Rogues Gallery,
a collection of trading cards with stats that summarize your history
with each enemy.

Side panels that allow you to see your inventory, status and granted powers at all times.

A graphical map that is automatically updated as you explore the dungeon.

Don't worry: you can also play Kerkerkruip in non-graphical mode
if you are using screen reader technology or a slow computer. The game
will ask you for your preference when it is first started.
There are of course also many changes to the game itself:

Several new rooms: the Hall of Raging Banshees, the Columnated
Ruins, the Tungausy Sweat Lodge, the Zen Room, and the rare but powerful
Arena of the Fallen.

New items, including the dagger Giantbane; scrolls of mutation,
mapping, and psycholocation; magical guides that allow you to identify
scrolls; and the crown of the god-king.

A new level 4 enemy, the overmind. It is weak, but it strengthens all its allies, and can call them to its aid when endangered.

Two new combat reactions: rolling (a more dangerous but potentially
devastating form of dodging) and blocking (a form of parrying in which
you use your concentration for extra defence).

Blood magic, which allows you to feed your own health to items in
order to make them more powerful. Are you willing to take the risk? Of
course you are. Are you willing to take it a second time, trading more
blood for more power? What about a third time?

A small but very significant tweak to the combat system: you can now snort ment during fights!