Tuesday, 12 January 2010

Altering permadeath in Unangband

One feature that has crept into Unangband during the 0.6.3 development cycle is making permadeath an optional experience.

This was an entirely unintended side effect. One of my co-developers added an auto-save function before leaving a level because level generation was quite unstable while I was heavily revising the dungeon generation code - it's a lot more stable now. If level generation crashed completely, there is now a save file with a .bkp extension which you can helpfully reload to end up just at the point before you left the level.

Now, if you start exploring a new level and die horribly, it's just like having a save game at the start of the level which you can revert to which places you on the stairs from the previous level. And, conveniently, there's no in-game record of you using this backup file, so Unangband has ended up like many other games and allows you to go back to a predefined check point and try again.

So prior to 0.6.4 final, I'm going to have to do a couple of steps to make this a more 'official' process. The first one is to mark the save file to note how many times you've recovered to the backup - so it is fair on other players who choose not to use this.

The second is I need to consider whether to ensure that if you reload this file, you end up on an entirely newly generated level instead of at the last level - and that level is different every time you recover to the save file - or whether you always end up on the same new level. There's several different issues here, around player expectation and various save scumming behaviour. Is it better to have a different level every time, and leave the game open to abusive practises of reverting to the save file if the new level isn't any good, or let the player play out the same level multiple times and try to improve whether they can survive? I'm leaning towards the repeating the same level because it matches what you expect to happen in this instance.

The third is to make this an official option so that it happens automatically if you choose the birth_no_permadeath option. It won't be a completely smooth user interface because Unangband is currently not re-entrant - you have to quit the game and restart to reload the save file.

The fourth is to allow the player to reload a save file partway through a level without having to die. Rather than just make this a menu option, I'm going to let an in game item do this for you.

Alter Reality is an example of a feature that was developer-led rather than game design-led. It's very easy from a programmer point of view to add - it just involves invoking the level generation code (actually the level leaving code). But from a game design point of view, it's horribly abusive. So I'm incredibly tempted to have Alter Reality load the save file instead, letting you replay the level from the start. It feels thematically stronger, and I'm a big fan of Philip K Dick, if not the movie which is merely above average Hollywood fare.

2 comments:

Unknown said...

The fourth is to allow the player to reload a save file partway through a level without having to die. Rather than just make this a menu option, I'm going to let an in game item do this for you.

I don't know if this is what you meant by "in-game item", perhaps you meant a menu item. On the other hand, having a reverts as an actual game mechanic could be an interesting experiment. And worth tonnes of cred on a Rouge-y meta-level.

Here's what I mean: Have a rare, 1-use "revert level and disappear" item. Maybe only one guaranteed / pregen'd, maybe more as rewards for risky things depending on how often you see it being used and it's utility.

The problem is, my unfamiliarity with Unangband is letting me down here... What I'm suggesting may b totally inappropriate and against the spirit of the game. But I'll continue anyway.

So call it a "Cat's soul", or "Felis animus" (Latin horribly wrong, but you get the idea). Perhaps an "enchanted hourglass", although the "sands of time" metaphor is a little worn by now. Mind you, that might be more in-keeping, as you could find plain-old hourglasses and have to identify the stupidly useful ones.

The hourglass could have some nice use descriptions though: "As you turn over the hourglass, the grains tumble upwards and disappear! More..."

Acquiring an item like that should take some serious peril, as way the player effectively has one "get out of jail free" card. If that makes it too easy, reset the level to the original sate, but leave the player's equipment where they used the item. Or some proportion of the equipment, depending on BUC status. Or, if sending the player to a random gen of the same level, scatter their equipment about the level. Many possibilities here.

I think it might make for an interesting gameplay mechanic, although I do apologise if it's not within the spirit of the game.

Unknown said...

Dang. Rereading what you wrote it seems you do mean an in-game item like what I meant. And I thought I'd had a good idea for a moment!