Yeah, it's time for another update on this weird chat interface that I'm developing. To give a basic overview, I am developing a chat interface that will allow players to converse with NPC's in an MMO world with the following goals/restrictions/features:
1) Must be scalable (this is an MMO we're talking about).
2) Must
not use parsed language or grammar. This is due to bad grammar, bad language, misspellings, and localization, which would mean rewriting all of those other algorithms.
3) It must be tied into the AI/AE (Artificial Intelligence/Artificial Emotion) system.
4) It must actually have a bearing on the game world.
5) It must be modifiable on the fly by a dynamic mission generation architecture (more on this another time).
Okay, so that's asking a hell of a lot out of your NPC's, but if it is done creatively enough, well... it can be done. In previous blogs, I've talked about how I'm utilizing a database implementation of canned dialog elements to represent conversations, which immediately addresses #2 (it also dovetails with any future localization efforts, because we'd only be translating canned dialog). As a database, it also addresses #1, but only in it's implementation, where I received some help on normalizing databases from my day-job's boss, who is a SQL ninja with about 12 years of that under his belt- he taught me a lot about how to solve MMO problems in a database, including how to streamline the data. To emphasize:
If anyone is planning an MMO, learn SQL early on, and keep tweaking and optimizing how your data is represented. That's your meat and potatoes right there, and you don't want it crapping out on you.
Back to the topic at hand... #'s 1 and 2 are taken care of, but then again, so is #5, due to the dialog being represented in a database form. Of course, there are certain data types I'm using (which shall remain nameless for now) which help me to do quick queries for pairs of dialog, even when there are multiple answers to a question. By "multiple answers", I mean that an NPC can give you a right or wrong answer, a lie, an answer colored by emotion, or even no answer at all (yeah, that NPC is totally ignoring you, dude). This also lends itself to a tool that I created to create new pieces of dialog in an in-game editor, so that you can expand your NPC's conversational abilities on the fly as you test the system. Some coding would still be required for the AI/AE pieces (done in script), but for the dialog itself, you can click through a conversation, find where you want to expand the dialog, switch to the editor, and add what you need there, then return and go along as if you never stopped. Once the dynamic mission generation system is running, it will do things like this automatically using templates to generate specialized dialog tailored to a mission.
Item #4 is self-explanitory, and depends more on me not putting stupid subjects in there, but it's a valid issue if you don't know what those NPC's should be talking about. And lastly, the system needs to be able to be influenced by the AI/AE system so that the dialog actually reflects the rest of the experience. So, before I get to the screenshot, I'll give status on the items below, and some challenges I've encountered:
1) Some more normalization needs to be done, but after a revamp or two of the database structure, I think it's in a place where data can be pulled together rather quickly. I will need to create testing applications to stress the system at a later date, but I think for dozens or even a few hundred users, the system will hold up relatively well, with acceptable lag times on a very modest server.
2) Canned dialog FTW! Honestly, it solves everything in this item, though it poses a unique problem in that when it comes time to hire on a writer(s), they will be in a difficult position creatively. Creating dialog without knowing all ends is going to be a bit of a learning experience for them, though the ability to do it while playing the game should give them the ability to play through the dialog and sense what else needs to be "said", and then add that...
3) Adding the AI/AE into the mix is not as tricky as I thought it would be, but I still want to abstract it a bit more so that there's some extensibility. Doing it that way should also benefit the AI/AE systems on their end of the scale as well, though I've hacked it in for now for lack of a fully clear view of which way to go with it. In the next few days, I'll have this decided on and the system testing. As it is, the basic principles of their influence are already there- it's just the way the backend goes about it that I think I can do better.
4) Dialog's bearing on the game world is starting to make me think in very deep (and mundane) ways about my world. If you want to talk to an NPC about it, then you can get a huge amount of information from these NPC's. They won't all have the same dialog or "knowledge", but instead will have knowledge of topics to a certain extent, which is variable. This is where lot's of backstory needs to be written up.
5) The extensibility of the dialog is already working with the editor, and it's just a matter of seeing what kinds of dialog are needed for the dynamic missions, which are the next targeted feature that I'll be working on. The good news is that this was designed in tandem with the dialog system, and the bad news is that this is all terribly complicated.
All that said (if I'm making sense anymore), take a look at a quickly-rigged test app in TGB (with TGB "Asteroids" tutorial art in it, for those that will wonder):

This demonstrates varied answers to the same question, as well as failed attempts by the player to get an NPC to answer the question. The blank lines where it looks like something was skipped are actually unhandled dialog (my own mistake with some early on that I haven't fixed). The logic behind it can use a lot more AI, but that system isn't really implemented yet, and I'm just testing the variables that affect dialog right now to make sure they work, whereas when the AI system goes in place, I'll have to test to ensure that they work "believably".
For those interested in this kind of MMO tech, I'll be doing some informal demonstrations of it at the IMGDC coming up in Minnesota at the end of March. By then it should be in a much more advanced state, and other game functionality will hopefully be added to it as well to provide a more rounded experience. Don't expect the sample art to change though- I'm not concentrating on that at all until I get these core systems tied together over the next couple of months. In the meantime, comments, critiques, questions, concerns (uh, should you be concerned?) are all welcomed!
You need to be a member of Association of Virtual Worlds to add comments!
Join Association of Virtual Worlds