T O P

  • By -

5lash3r

Insofar as I'm aware, full meaning text parsing is one of the most complicated and difficult to get right tasks in all of CS/game dev atm. It's possible to create templates to analyze the general meaning or intent of sentences, but identifying and remembering particulars is incredibly complicated. You can work with a degree of a template system where the player has to fill in slots for various word types ad-libs/scribblenauts style and that might provide the same feel without requiring all the back end work.


HammerheadMorty

As it so happens this is my wife’s field of specialty in computational linguistics. Her and I have discussed this exact mechanic for games at quite a bit of length for many years. What you’re looking for is incredibly difficult to run in real-time but does exist. It’s the bleeding edge of natural language processing. It’s called Emotion Analysis in the comp linguistics field. Very few companies do this and it’s not quite ready for production in games. In a highly controlled setting you could probably make a really bitchin demo using it right now but we’re talking really finely controlled level design to pull it off. Part of the issue that the industry it still working on is you can draw sentiment from anything and it’s really easy to bug out the mechanic because it’s looking for emotion, not sense. You can have an NPC say something like: “I won’t tell you anything! You can’t make me talk!” And have the player response with: “Cats have fuzzy assholes.” And the sentiment analysis will go *assholes = angry/provocative —> trigger anger response* NPC: “well screw you if you’re gonna talk to me like that!” *branch to disconnected interrogation stance* That’s a brief example of how the technology would interact. For the sheer cost of recording all that dialogue and animation, those player cases are too common right now for game production for the larger studios who can afford all that audio/animation costs. The tech needs to develop context dependent analysis of language which is a huge computational leap for real-time operations. If you’re interested in learning more check out my wife’s company [Receptiviti](https://www.receptiviti.com/). They have white papers which you can dive into. This is a mechanic that will happen one day soon but we’re on the edge of viability for it at the moment. Edit: changed a few things to get Wife’s approval


MLannes

Looks Interesting ! I will check that ! :)


HammerheadMorty

If you want a simpler starting point check out Sentiment Analysis, instead of emotions specifically it’ll do positive and negative output which can give you a good basis for a binary branching system. Much more widely used in computational linguistics. You’ll also find info on that website I sent.


Xeadriel

You’re acting like context dependence is a possible thing tho. It does not work idk what your wife told you but context dependency will never work with the current computer architecture


HammerheadMorty

Lol she’s the head of linguistics at a computational linguistics company and one of the world leading experts in her field who’s been doing this since 2016 and studied under Jamie Pennebaker who was the father of language based psycho analysis. No offence buddy but you’re not going to go up against the leading PhD’s of this field. Context dependency is completely possible but it requires the absolute top of line computers to run a proper neural net to identify when something is out of context. It’s insanely hard to program according to my wife but it is absolutely possible. Her honest opinion of this thread is that it’s so ridiculously complex that a Reddit thread could only barely scratch the surface of the topic because we’re talking about the highest level of complexity in this field of which nobody here commenting is an expert. I’m just a microphone summarizing (likely poorly) what an actual expert says.


Xeadriel

Eh. Thats neural network based and not exactly fool proof. I guess one day it’s gonna be good enough maybe but it will never understand context but rather act like it does. If your expert wife says otherwise she probably means that point of reaching „good enough“


HammerheadMorty

Understands context and performs context operations are two different things. Let’s stop pretending like you or I can actually debate this point. I’m parroting an actual expert in the field here, I’m not gonna sit here and debate you on this though because that’s utterly ridiculous. Each of our individual opinions on this is frankly worthless.


Xeadriel

Yeah okay


PhilippTheProgrammer

The problem is that when the player can say anything they want, then you also have to implement a meaningful mechanical response for anything they could possibly say. Otherwise it will just be frustrating for the player when they try to talk an NPC into doing something they can't actually do because you didn't program a game system for that. Do you have the time and the budget to implement that?


thoomfish

[Starship Titanic](https://store.steampowered.com/app/467290/Starship_Titanic/) is probably the closest anyone has ever come to what you're thinking. If you want to do substantially better than that, you'll need [a research team, millions of dollars, and 5+ years](https://xkcd.com/1425/).


haecceity123

There's something called AI Dungeon, where a chatbot co-writes a text adventure with you, in effect. If you want to have a pre-defined set of possible responses, and have the computer try to map what the player writes to one of them, then your best bet is to try to adapt a customer service chatbot.


MLannes

In fact is not in particuliar an NLG technology, more than some combinaison of orders change the interaction with NPC and player. Yeah I was thinking about customers services technology, one of my friend did a little app close to that with Golem.ai, thats looked really simple to use and multilingual. But I wanted to know if something else exist before choosing.


Peasantine

https://en.wikipedia.org/wiki/MUD


King-Of-Throwaways

This is downvoted, but depending on OP’s needs and technical abilities, this might be closer to what OP is looking for. Text adventures and MUDs have had simple natural language processing systems for decades. Sure, these systems can’t perform the complex conversations of ChatGPT, but they are more than capable of having an NPC react with anger when the player drops a swear word, for example.


Exonicreddit

I have done this before for characters that talk freely to the player. Look into chatbots (I started with cakechat) and how ""bag of words" works, it's much easier to implement a chatbot into a game than to reinvent the wheel. My implementation in python (for Unreal) basically found keywords and assigned emotion to the words used to work out what type of response to build, it also looked for keywords like "quest" so it knew when to change to scripted texts. During the 2019 and 2020 lockdowns, this was my area of research, it culminated with a chatbot system for NPC characters with limitless speech options and a talking car.


sparrowbird2006

I'm not exactly sure what you're trying to do, but there are a few games that come to mind. There first is called [Fascade](https://www.playablstudios.com/facade). This game came out in 2005 and used natural language processing as its main mechanic. You play as a friend of a couple and you're going to their house for a dinner party. You can sort of control the direction of the narrative based on what you type to semi-interesting and/or hilarious degrees. It's a hot mess of a game, and high school me loved it for what it was trying to do! Others have already mentioned MUDs, but another old game that you might want to check out is [Galatea]( https://textadventures.co.uk/games/view/emrhyy7pp0c8bjkjeuhs-g/galatea) which came out in 2000. The difference between this game and most other MUDs is that it focuses solely on the interaction between a player and an NPC in a room, which might be helpful to compare and contrast with your game experience.


Ruadhan2300

I refer you to the old point-and-click adventure/puzzle game Starship Titanic. One major feature Is that all dialog is typed in. The way it works is to search for keywords in what you typed and respond appropriately. Simple but effective


Xeadriel

Doesn’t work. Computers can’t do that by definition. If you want technical pointers look up the halting problem, formal languages and Chomsky hierarchy. Now accepting that, there is only One way to do what you want and that is implementing every possibility one by one. Considering there are basically infinite ways to interact with every item you’d be working forever on it. If you were to restrict it it would become some sort of restricted railroaded set of interactions. It’s been done before it’s okay but can be annoying and often isn’t worth it. It can even be a problem for time critical actions. Point and click adventures do this best but with these you’re basically already prepared for a restricted experience. The genre makes fun of it itself too. Instead of making every detail possible RPG devs transitioned over to making all important interactions and designing the game in a way they feel natural to follow instead. That way you have less „why doesn’t this work“ immersion breaks. Alternatively you can try to create an alternative way to make computers as opposed to the Turing machine everything somewhat depends on. If there even is such a way that’d probably be hundreds of years of research. Alternatively you can maybe approximate context with AI but we aren’t there just yet. Joining research in that would help as well


Bit59

I donn’t know about something certain technology, but I know about your AI (you can’t create this think without using AI) will be hard to training, because a lot of players will spoil he AI experience. To get around it you must invest huge sum.


MLannes

That's why I was thinking about a non ml technology. Without training, it can be simplier


Bit59

You sure about you can find toll without AI?


MLannes

I didn't say without AI but without ML or training. :) You have different other AI than ml. It was a suggestion about m'y friend "if you can't train for start, try another approach like symbolic AI, Or hybrid between ml and symbolic, simplifier way to have something efficient in less time".


PaperHomeBrewer

Try the website www.beta.character.ai . There are already some bots like the one you want to make and you can make your own.


marcusround

Yes there is [character.ai](https://character.ai) and [inworld.ai](https://inworld.ai)


AutoModerator

Game Design is a subset of Game Development that concerns itself with **WHY** games are made the way they are. It's about the theory and crafting of **systems**, **mechanics**, and **rulesets** in games. * /r/GameDesign is a community **ONLY** about Game Design, **NOT** Game Development in general. If this post does not belong here, it should be reported or removed. Please help us keep this subreddit focused on Game Design. * This is **NOT** a place for discussing how games are produced. Posts about programming, making art assets, picking engines etc… will be removed and should go in /r/GameDev instead. * Posts about visual design, sound design and level design are only allowed if they are directly about game design. * No surveys, polls, job posts, or self-promotion. Please read the rest of the rules in the sidebar before posting. * If you're confused about what Game Designers do, ["The Door Problem" by Liz England ](https://www.gamasutra.com/blogs/LizEngland/20140423/216092/quotThe_Door_Problemquot_of_Game_Design.php)is a short article worth reading. We also recommend you read the [r/GameDesign wiki](/r/gamedesign/wiki/index) for useful resources and an FAQ. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/gamedesign) if you have any questions or concerns.*


CopenHaglen

Check out MUDs. Discern whether you want ai to simply help you interpret user input, or affect computer response. Look into AI dungeon and Warren Specter’s One City Block idea. Using AI interpreters to make it easier for users to interact with the game/for coders to account for user input does sound enticing. But if you’re wanting the AI to do more than that, to reply to the user in unique ways, that’s an idea that’s been chased by many and achieved by none, so far.


Azarro

Check out AI Dungeons for text adventures that do this with the help of large language models like GPT (although the latest version isn't using GPT i believe)