Categories
Game Design Game Development Geek / Technical

Freshly Squeezed Progress Report: Implementing a Character’s Mind

Last week, I reported that I had finished clothing customization, fixed an issue with the Android build, and then created a way to configure your party in The Dungeon Under My House, my second Freshly Squeezed Entertainment project.

I finally started serious and earnest work on what is probably the biggest key to this game’s design: the dialogue system.

Sprint 36: Pre-production and initialization

Planned and incomplete:

  • Characters speak when TALKed to

When I started the week, I had plans to add menu options to let the player initiate a dialogue with another character or multiple characters in the vicinity, either by telling someone something or by asking about something.

The Dungeon Under My House - dialogue

Right away, I realized that I needed to step back and get those “something” concepts figured out. I needed to get from hand-wavy and vague concepts to something concrete and playable.

Now, it isn’t as if I haven’t been thinking about this topic for many, many weeks. I’ve got browser tabs open that are almost as old as this project is, each pointed to various forums, Reddit threads, and Wikipedia articles.

I spent much of the early part of the week reading about how communication and dialogue works. It turns out that this topic isn’t covered in a single field of study, such as linguistics. Everything from sociology to philosophy to anthropology to computer science to screenwriting touches on theories and models of communication. It’s a rich research area, and I know that I’m barely scraping the surface when I look at the Wikipedia articles or references.

I’ve also found posts online from other game designers trying to tackle the challenge of making dialogue compelling. Once you skip over all of the replies from people who can’t get past some surface concerns, there’s some real interesting directions to go in, such as this post about how modeling relationships with NPCs is the same as psychological simulation, acknowledging that there is no simple way to do it.

I just finished listening to The Great Courses: How Conversation Works by Anne Curzan over the weekend, which taught me concepts such as the locutionary, illocutionary, and perlocutionary forces, as well as putting names to the concepts I was toying with of report talk (functional, information transfer) and rapport talk (about relationship/affinity).

And of course, Chris Crawford famously left games to work on furthering interactive storytelling, and he had the advantage of dedicating himself full-time to the effort. His focus was on making a new form of drama rather than a new form of game.

And while I’m not interested in doing the same, I think it helps to know what has come before.

I don’t usually give myself a lot of time to play games, since my time is so limited for game development that it feels hard to justify not doing game development when I have a moment of “free” time. But I made some time to play Oxenfree and Signs of the Sojourner over the last few weeks, as each did something a bit interesting with dialogue.

Oxenfree was a delight to experience (how did I sleep on this game? Oh, right, I don’t play games as much as I would like), even when there were times that a character would interrupt his own line of dialogue or when Clarissa would reply outside of the house when I was inside perusing books on shelves, which was creepy in a way that the game didn’t intend.

And Signs of the Sojourner makes the deck-building game all about conversation. In each conversation you try to match cards with someone, and if you do well, you get some good responsive dialogue, but if you don’t manage to match cards, then it represents a failure in communication somehow. And the game simulates overall exhaustion by giving you cards that can’t match whenever you travel, and if you have too many such cards in your hand, you might have no choice but to fail a conversation.

However, both games still seemed to boil down to pre-written, branching dialogue under the hood. Even if Signs of the Sojourner has you play a game rather than choose your dialogue, you still encounter either a “good” script or a “bad” script.

And while I know that some people are experimenting with generative AI creating dynamic dialogue for NPCs, it is only really solving the “what to say” part, but it is still doing so within a framework of typical dialogue as seen in most games.

I’m more interested in figuring out how to make dialogue playful.

And since I like to keep pointing out how part-time my efforts are, I’ll take this moment to say that I both love all of this research and hate it. On the one hand, it gives me a base to stand on. I didn’t make up what I’m doing from scratch, and so it should be more familiar and understandable to a player. It’s based on the state of the art of humanity’s understanding (or at least my understanding of humanity’s understanding).

But on the other hand, I wish I could spend a lot more time living in the rabbit hole, experiencing other games, studying research papers, and corresponding with experts to get a feel for what that understanding is. But since I have a day job and a family and other obligations, I allow myself only limited time to work on my game development efforts, and it is even more important that I pay attention to how much time I spend on something that doesn’t get the game released.

It reminds me of how much I could accomplish in a shorter period of time if this was my full-time endeavor rather than something I make an effort to give space for. And I always feel like whatever I create is the equivalent of a child’s drawing when that child has no understanding of light, shadow, shape, line, and perspective.

And I suppose the only thing that helps is knowing that it isn’t like a ton is riding on this one effort. It doesn’t have to be my best and last. It just has to be my best that I can do right now, which can inform tomorrow’s efforts.

So what if I take this Freshly Squeezed Entertainment project as an opportunity to explore one approach that I might take? And the next project can be either a different approach entirely or a refined version of this one.

After all, I don’t have to solve “compelling dialogue in games” in 2023. Or 2024.

So as I said, early in the week, I recognized that I was in a rabbit hole of Wikipedia articles, and while I like it there and don’t want to be pulled out yet, I also want to prototype and play with something sooner rather than later.

I’ve mentioned in previous reports that conversations can revolve around Topics. So before a conversation can happen, those Topics need to exist. And the characters need to know about them.

So I created a Cognition object that each character has. Maybe I should have called it a Mind? Too late. The file is saved.

Anyway, a character’s cognition currently represents their knowledge, values, beliefs, and attitudes. If a character doesn’t “have” a Topic, then they aren’t aware of it, and so they can’t ask about it, and they certainly can’t tell someone else about it.

What they know about the topic could range from very little to being an expert on it, depending on what Facts they might have collected related to that topic.

BUT they could also have Beliefs that may or may not be true. So those beliefs aren’t verified facts, just assumptions or hearsay. They believe X, and as far as they are concerned X is true, but in objective terms, X could be false. And they might have a range of certainty of those beliefs.

Assumptions/Beliefs can be verified or falsified, which may depend on the character’s willingness to deal with the truth when it doesn’t match what they wish it could be.

But I’m getting hand-wavy again. In concrete terms, I created a character’s Cognition, which has a collection of Topics representing awareness of some subset of all of the Topics possible in the game. To start, the Explorer’s Club characters can know about the club and its members (each other). They can know about other characters, such as the player’s parents in the kitchen. They can know about rooms such as the bedroom being a meeting place and the kitchen and the basement.

I was hoping to implement a way to allow a player to see the topics that their main character knows, but I ran out of time before the week ended.

That said, despite not having much to show in-game, I was able to create a quick prototype using a deck of cards to see what it might look like to have three characters, each with some set of topics, and see how knowledge can get shared and disseminated. It helped me see that having Topics representing awareness is fine, but having Beliefs about a given Topic gives the player more tangible things to play around with.

Perhaps having a Topic means the player can ask another character about it. “What do you know about SAILORS?” for instance. But you can’t volunteer information about sailors if you don’t have any facts/beliefs collected.

Currently a Cognition has Topics to represent awareness, and a Topic has Beliefs to represent knowledge about that subject.

And remember, those Beliefs could be wrong, so there might be contradictory Beliefs or disinformation to deal with.

I’m hoping that learning a new key Belief/Fact is going to be as exciting as discovering a magical piece of weaponry or armor usually is in a typical first-person dungeon crawler.

Thanks for reading!

Want to learn when I release The Dungeon Under My House, or about future Freshly Squeezed games I am creating? Sign up for the GBGames Curiosities newsletter, and download the full color Player’s Guides to my existing and future games for free!