Limbo, Death and Beyond
Here's a little rabbit hole I ended up in, but I believe it's one of those better ones. It's about handling death - not just the player's, but others too.
Limbo
Previously, I added the concept of "Limbo" in the game. It's an extremely useful concept: it's a "place" where entities go when they should be part of the game, but nowhere in particular. Here's an example of where the concept is useful. Say you have a quest item that, due to emergent gameplay mechanics, gets indirectly destroyed, e.g. it resides in a level that gets completely destroyed. What happens to the item? Well, it can go to Limbo, and it can reappear somewhere in the world after a while. Same with important NPCs.
Death
My design goals for player death is not just "game over" - after having played for a few hours, I want the player to be able to invest in some sort of life preservation/resurrection, within the game's lore. This will be fleshed out more when cities are implemented. But what about other creatures, especially sentient ones?
Souls, Phylacteries and Resurrection
While on a flight, it struck me that the concept of Limbo works very very well with death and resurrection. And that's what I've been dealing with, slowly, for a month or a bit more. Here's the current design of death/resurrection, that just works:
- Pets, sentient creatures and quest creatures have a soul. The soul is basically the actual entity, with all temporary effects removed and all items dropped.
- When creatures-with-soul die, they create a corpse item with the soul attached. The soul goes to Limbo. The
- The creature can be resurrected via the corpse, if a spell is cast before the corpse decays or gets destroyed.
- The process of resurrection is effectively to just move the soul from Limbo back to the world, and destroy the corpse
Now we can go slightly further and introduce phylacteries: special items that can store souls:
- With an ability, we can attach a soul to an empty phylactery
- When the creature gets killed, if its soul is not bound to a phylactery, a corpse with a soul attached is generated, as described above
- When the creature gets killed and its soul is safeguarded in a phylactery, no corpse is generated, and the creature gets automatically resurrected after 24h at the phylactery.
- The phylactery can be stored in a safe location, as usual, and therefore make the entity practically forever-living
- Constraint: We can't have more than one phylactery (so, no seven horcruxes)
This just works, and besides being just another feature, it adds loads of questing/adventure possibilities:
- Destroy the lich. Oh - the lich had a phylactery! New quest: find and destroy the phylactery.
- A villager or pet died - go find a scroll of resurrection before the corpse decays, to resurrect them. Alternatively, bring a healer from a nearby village to perform the rite.
- A villager/pet was lost near some ruins. Go find them. When you arrive, you find a corpse - race against time to resurrect it.
- Necromancer's guild quests: bind creature souls to phylacteries, kill them, and bring the items back to the guild.
- etc
As an extra tidbit, I've also made a visual effect to show that a soul is leaving a body, or returning to a body. It looks exactly as I envisioned it, which is nice, but other effects are playing at the same time so it's very hard to see. So here it is, in a slowed down video.
Game Stats
I'd like to include some game play info, displayed upon death but probably elsewhere too. Basically some fun, useless numbers, like places explored, distance travelled, total hits, total misses, etc. This is super-easy when messages fly around the program about every single thing - just set up a system with a bunch of listeners, listen, and record.
