Last week, I reported that I had spent time researching philosophy, linguistics, and more, and that I had also gotten started on implementing the means for a player to ask a character a question about any known topic in The Dungeon Under My House, my second Freshly Squeezed Entertainment project.
The more challenging part was the response, which I worked on this past week.
Sprint 38: Pre-production and initialization
Planned and incomplete:
- Characters speak when TALKed to
I had one of my least productive weeks in months, at least in terms of game development. Part of the reason was that I spent some time writing the latest issue of the GBGames Curiosities newsletter and figuring out the logistics of creating and publishing my first Freshly Squeezed Progress video.
But another part was that the week was filled with a lot of other things going on in my life.
Most of my game development time was spent on designing and planning. However, I did start the week as I planned by creating a response to the player’s question.
If you recall, you can pick a character on the screen, then pick the Ask option, then select a Topic from a list, and your character will then ask about that topic.
But then the conversation ended because I hadn’t implemented replies yet.
So right away, I created a simple “I don’t know anything about that” kind of response, which can be used whenever a character has no information about a Topic.
Which, at the moment, is the situation for everyone in the game about every Topic, including about themselves, funnily enough.
The next thing to do was to figure out how to get characters to reply about what they know, which requires implementing a way for these characters to know things about a Topic.
And just like how this work has been the entire project, it was vague and hand-wavy in my head, and I very quickly needed it to get concrete and playable.
Initially I had Beliefs as statements about a Topic: “Francis is a member of the Explorer’s Club.”
Which means someone who hasn’t met Francis or heard of Francis wouldn’t have “Francis” as a Topic in their cognition.
And a new character who meets Francis might not know about Francis being a member of the Explorer’s Club.
And Pat, who is also a member of the Explorer’s Club, would surely know both Francis and that Francis is a member as well.
It seemed straightforward.
But then I thought that statements like “Mom is married to Dad” have implications, such as “Therefore, Dad is also married to Mom.”
So maybe instead of Beliefs as lists of statements, Beliefs are represented as some connected graph-like thing, and those statements can be derived from that thing.
Interestingly, I later discovered that these are actual models of thought in philosophy when I was reading about belief on Wikipedia. There is the “language of thought hypothesis” and there is the “map-conception” which more or less map to what I was thinking above.
On the one hand, I feel like my thinking on this is on the right track since it seems supported by the great thinkers. On the other hand, I wonder if I would have had a shortcut if I had studied philosophy instead of computer science. B-)
I felt like I was reinventing epistemology. What is the nature of knowledge? And how can I code it in my game.
A colleague suggested that I look into the interactive fiction development tool TADS 3, which features conversations based on topics. Each character can be configured with a list of responses to a topic.
I read through some of the docs, and I liked that the tool provided a built-in way to track when the player discovers something and separately when the player has seen something, with acknowledgement that the developer may want to modify things so that each NPC separately tracks such data. It also provides a mechanism for “revealing” something to the player, which is basically when something goes from unseen/unknown to known.
It also has concepts such as the difference between asking someone about something versus asking someone for something, greeting protocols to ensure interactions don’t feel robotic, and suggested topics to guide a player to know what to potentially say or do in a given situation.
It’s a powerful tool, and when I tried playing Return to Ditch Day for research, I was impressed with how the combination of various parts of TADS 3 came together to make it feel like I was taking part in a living world and not just sitting in state machine waiting to put in the correct input to get to the next state.
Still, TADS 3 seemed to require writing a lot of custom content, guiding the player through the particular story being authored. On the other hand, I suppose it is potentially powerful enough to make a much more open-ended kind of game.
By the end of the week, I had some solid ideas about the nature of Beliefs in my game, some of which I even started implementing.
For instance, if a character believes something about a Topic, that Belief came from somewhere. Perhaps they always knew it, such as fellow Explorer’s Club members being friends since they could remember. For something like “Where is Pat?” maybe the source of their knowledge of Pat’s location is “I last saw Pat in the kitchen.” But maybe someone has only heard that Pat was in the kitchen from someone else.
And of course, Pat might not be in the kitchen anymore!
Which led me to step back from Beliefs and think about the concept of Facts and objective truth.
A Topic represents something to know about in the game. The game has a collection of all possible Topics, while a given character has an awareness of a subset of those Topics.
Similarly, for each Topic, there might be a collection of Facts. If Pat is the Topic, then a fact about Pat is that they are in the kitchen, for instance.
So maybe all Beliefs in my game should be variations of Facts? It’s a good start and gives me something concrete to toy with. A character might not know where Pat is, but a character might believe Pat is in any particular location provided they gained that “knowledge” somewhere.
I was already wondering how to handle complex Beliefs, such as “Pat is either in the kitchen or in the living room” or “Since Pat usually goes home at dinner time, and it is currently after dinner, then Pat must be at home right now.”
I do wonder how I might handle a character having an opinion on something. Opinions aren’t Facts. “I like spring better than fall” or “I like anchovies on my pizza” might be controversial, but there is no actual objective truth here to compare against. “I believe Pat is in the kitchen” is different in nature to “I believe Pat likes being in the kitchen.”
And it seems like allowing characters to have preferences and judgments to debate about would make for a more interesting world than one in which everyone merely regurgitates what they think they know.
These are the kinds of things that have me wondering how I could work on game development full-time sooner rather than later.
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!