Heroes Dev Log #15: Planned and Persistent Locations and Characters

Heroes Dev Log #15: Planned and Persistent Locations and Characters

Date
July 29, 2024

Heroes development is continuing at a rapid pace! I’m excited to share several updates in how we’re thinking about the experience as well as some of the improvements we’ve made.

🐉
For those of you who don’t know, Heroes is a massive evolution of the core engine for AI Dungeon, taking it from a simple text adventure to a full fledged RPG with character stats, inventory, health and damage, quests, tracked enemies and locations and much much more.

In the last dev log, I talked about a new NPC action generation system that makes NPCs take independent actions and feel more alive. Now we’re building on that with a brand new NPC generation system that will generate more detailed info about important NPCs, including appearance, personality, backstory and their underlying motivations.

We’re also building a similar system for locations. When you arrive at new locations we will now actually generate the different areas, inhabitants history and potential items you might find in that location before you begin exploring it.

I’ll talk more about these systems in a bit, but first I want to explain some of the fundamental design principles we’ve discovered, and why these type of systems are going to be critical for making Heroes into the kind of experience we want it to be.

Challenges of Relying on Improv

AI Dungeon and Heroes are both highly driven by the AI’s ability to improv stories on the fly. This enables amazing things. It lets you be who you want to be, choose what you want to choose, and have a real impact on a living dynamic world. But it also comes with several challenges. The core issue is that relying on improv alone means that the AI is always coming up with additions to the world and story at the last minute, without being able to properly consider how it fits into the broader whole.

With only improv, humans have some of the same issues. If you ask a Dungeon Master to improv a campaign without any preparation, you’ll often end up with a more disjointed experience and world, including many of the same issues we see the AI run up against.

Here are some of the problems this can cause:

Narrative Depth

Improv alone often results in a story where all you see is all there is, but the best stories make you feel like you're only seeing a fraction of what exists. Without narrative depth, you end up with more shallow characters, locations, and events.

Cohesion

Defining characters only while you improv can lead to character traits and behavior that don't make sense with past ones, location layouts that don't fit well together, and factions with unclear, in-cohesive goals.

Boundedness

Relying only on improv, we often end up with never-ending dungeons, never-ending quests, and never-ending enemies. Without a broader perspective, it's hard to create natural limits.

Satisfying Progression

Without cohesive planning, it's very hard to plan compelling arcs in characters or quests. You have to be able to look at the whole of the thing to make an arc, not just the next step.

Variety

We often see repetitive structures, like a temple where every one of the 6 rooms is another altar room, or quest with 4 different challenges that are all the same.

Control

Without good planning it's much harder to manage scope and difficulty. For example you might end up with big quests you finish after 3 turns, or small quests that take forever.

Progressive Disclosure

If you never plan anything deeper than what you tell the player, it's also challenging to create a sense of progressive disclosure. You can’t have mysteries that are gradually unfolded or characters you slowly get to know over time.

Dynamic Holistic Planning

So how do we solve this problem? As we wrestled with these issues on Heroes, we realized that all of them down to the same root. Without being able to plan in advance you aren’t able to create entities that are holistic, ending up with parts that just don’t quite fit together in a meaningful way. It’s like trying to create a human body by periodically throwing on new appendages without thinking through how the legs, arms, eyes, nose etc…all fit together. Yikes!

But wait, isn’t the whole point of AI Dungeon that we don’t know what’s going to happen in advance? How do we plan when we can’t even know what you’re going to do?

This is where the “Dynamic” part comes in. While we can plan some things before you even start the game, like the world lore, skills, major locations etc…. We can never know all the locations, characters or quests you’ll end up discovering. That’s part of the magic!

Instead what we can do is create a dynamic planning system that continually plans on the fly as you explore the world.

This is actually very similar to what most human dungeon masters do. They plan before a campaign starts, but they also plan in between every session. You might reach some new ancient temple at the end of a session, and it’s very possible your dungeon master has no idea what’s inside.

But that’s okay, because in between those sessions they can take the time to plan out what you’ll find in the temple as you explore.

Similarly in Heroes, with the new character and location planning systems, we don’t know what locations you’ll find or characters you’ll meet. But as soon as you find them and it’s clear they’re important, we can take the time to plan them out.

This lets you have the freedom of infinite possibilities as well as the cohesion of planning important parts of the world.

Putting it Together

Combining the NPC action generation system and the NPC planning system, I had one of my most amazing experiences in Heroes I’ve had yet.

I started out on a quest to discover my brother, who had disappeared 10 years ago. After travelling to the town he was rumored to be in, I found him!

At that point the new character planning system generated a deep backstory for who my brother was, why he was missing, and the conflict he was embroiled in.

Knowing the character’s background, the NPC action generation system brought him to life.

I ran up to him, and after a quick reunion, he immediately told me: “We’re not safe here Persephone. I’m being hunted.” Now my curiosity was peaked! Who is he being hunted by, and why?

I begin to ask him these questions, but he says there’s no time and grabs my arm, pulling me down an alleyway. Immediately we hear a commotion behind us as a band of thieves crash through a market stall.

We run through the alley till he pulls me through a side door into a dark room. He tells me he’s been undercover for a group called the Shadow’s Hand until he was betrayed, and they sent operatives after him.

I try to understand why he left our family, but then an operative bursts through the door, and an epic knife fight ensues. Together we finally manage to restrain the assailant. I ask him why he’s after my brother, and he growls at us and says, “Because Roderic wants no loose ends.”

Then, out of the shadows steps Roderic, who turns out not just to be an operative but a third brother who betrayed our family. Now I have so many questions. I ask them, but the mystery only deepens.

image

At this point, I’m hooked. I’ve become so invested in this story, in finding out about my family, my brother, and what happened that I want to figure out how we got here and how to solve these conflicts at the root of my family and who I am.

The Power of Planning

This experience was dramatically different from others I’ve had on Heroes. In many of my past experiences, I had lots of fun, but I didn’t necessarily feel like there was greater depth in the characters and world I was getting to know.

For the first time, that changed. With dynamic planning, I finally felt a sense of mystery, of wanting to know more about this world. I could tell I was only seeing a part of what was happening. It made me want to know more, to unravel the mysteries of my family’s past, of my brother and where he’s been. And it pulled me into a greater adventure in a world that felt bigger than what was immediately around my character.

We’re still early on in fully fulfilling this feeling, but I feel more confident than ever that we’re on the right track. As we build the right systems for dynamic holistic planning, I think it’s going to bring the experience to a whole new level.

Excited for when you all can try it out. :D

– Nick Walton

icon
We’d love to hear your feedback about Heroes, so please share any and all questions, comments, or ideas with us!

Join the discussion on Discord →