NPCs and dialog system!
Hello everyone! After having developed the game’s quest system I’m now mostly done with the dialog system; the interface which lets you communicate with the game’s Non-Playable-Characters. Such an example of NPC is Kerold, an old inmate in the bowels of Dwindling Height’s prison (don’t mind him, he’s a bit mad 😀 ).
The dialog system of course deals with displaying the NPC’s dialog on screen (as there are no voiceovers in the game). Text is supported by a 2D portrait of the character’s expressions and sound effects. It’s a pretty tried-and-true approach which works quite nicely in the game.
But the dialog system also has to fulfill many other functions. In fact it can get pretty tricky to manage in the long run and it’s very important to make it modular and simple enough to maintain and/or expand. Here’s an overview example of a dialog tree structure (just a few branches actually):
NPCs can greet you with several different lines depending on the current situation. But through dialog they must also be able to interact with the game’s quest system I mentioned at the beginning.
They can query the state of some quests or tasks (quests are made of a certain number of tasks), they can start a new quest, trigger the completion of some others, check if Tilo has some items in his possession, or even give him some items, accomplish an action, etc…
At the heart of the dialog system lies a test-machine parsing many different conditions and displaying dialog nodes depending on the results. Dialog nodes are only revealed if their conditions are fulfilled and some nodes should only be displayed once and never again. The system needs to keep track of all this information and it is obviously crucial that everything stays synchronized!
Paul and I have spent a LOT of time talking about finding the “voice” of the characters and Paul has already written quite a few spiffy dialogs. So I have to say that adding at last this level of interaction to the game feels great… 🙂
Eisfuchs
July 6, 2015 at 12:59 pmYay, more updates, and great looking characters to boot 🙂 If you ever need actual voices, let me know.
Oursique
July 6, 2015 at 1:13 pmGoatDebug 😀
Seith
July 6, 2015 at 9:40 pmWell spotted, Oursique! 😀
Cyrille wrote this custom debug command for me to pepper my code and it could only be named this way of course… 😛
Da
July 6, 2015 at 1:57 pmJ’ai trop hâte qu’il sorte ! (patience, patience…)
Tu fais vraiment un travail remarquable Seith !
Et courage (se ne doit pas être facile), on est avec toi 😉
Seith
July 7, 2015 at 6:18 amMerci pour tes encouragements! Non, ce n’est pas facile tous les jours, mais ca reste tout de meme une formidable experience!
evilkinggumby
July 6, 2015 at 3:23 pma frog with a beard..
yes.. i have seen everything. Thank you sir!! 🙂
pelemele
July 6, 2015 at 3:40 pmSuper boulot, bravo !
Vivement qu’il sorte 🙂
Uleertel
July 6, 2015 at 4:38 pmTrès intéressant tout ça. Et surtout une grenouille pirate, j’adore!
KwisatzHaderach
July 6, 2015 at 5:12 pmBillions of billious barbecued blue blistering barnacles! That beard! The beauty… Urg, that cockroach though!
This game is so stunnigly beautifull! Surely that pic at the top is actual “in-engine” footage ;)?
Also thanks for letting us take a peek at how that dialogue tree works, very interesting indeed! I can’t wait to hear what good ol’ Cap’n Frogbeard will have to say. Just one thing I can’t wrap my head around, Seith: you mentioned that there won’t be voice-overs (the “idea” with the 2D-portraits sounds lovely and very fitting!) but then at the end you go on about looking for the right “voice” for the characters… I take it they wont actually speak words but rather express some more abstract, musical speech? Kinda like in The Sims or Brothers – A Tale of Two Sons?
Jimmey
July 6, 2015 at 5:28 pmI could be wrong, but I think he means the way they speak. Like how some characters can be defined by the way their lines of text read… Off the top of my head Raijin in FF8 is an easy example, with his constant overuse of the phrase “Ya know!”
KwisatzHaderach
July 6, 2015 at 6:15 pmBlithering Bombardiers! That is probably what he meant! I am feeling silly now…
Seith
July 7, 2015 at 6:24 amNo need to be! The term “voice” is used commonly in scriptwriting but it can lead to some confusion depending on the context. And that was an edge case. 🙂
Seith
July 6, 2015 at 9:36 pmThanks Jimmey, that’s exactly what I meant. Each character talks with a specific pattern and rhythm which hopefully makes them sound more unique (without becoming walking cliches).
Ideally it would be possible to just look at a couple of nodes and know who’s talking.
KwisatzHaderach
July 6, 2015 at 6:49 pmNot a Cockroach but a True Bug! I’ll shut up now 🙂
Seith
July 6, 2015 at 9:37 pmThat’s right! After working so hard to squash the game’s bugs it felt strange adding more in! Albeit real ones indeed… 🙂
Stormswrath
July 6, 2015 at 10:39 pmWhy no ps4 version?
Seith
July 7, 2015 at 6:16 amIt’s just that Microsoft spontaneously sent us Xbox One developer kits whereas Sony hasn’t expressed any interest so far (granted we only talked briefly on Twitter). There could very well be a PS4 version eventually but meanwhile please don’t hesitate to let Sony know about your opinion.
daniel
July 6, 2015 at 11:20 pmAh, the old ‘skewed code screencap’ ;). Whitesmiths style braces? I guess all is forgiven because that frog captain looks utterly fantastic. I really can’t wait for this game!
Seith
July 7, 2015 at 6:08 amYes, the dreaded Whitesmiths bracing style! Love it! Which gives me away instantly as a fake coder I guess… 😛
Johan
July 7, 2015 at 8:14 amI just love how this game is coming together. As always, quality update!
Corentin
July 7, 2015 at 9:56 amYou are progressing quite fast!
As always this looks great 🙂
What’s the tool for the dialog tree structure image?
Seith
July 7, 2015 at 11:36 amThanks Corentin! The app is called “Simplemind”.
Tommy Scott
January 13, 2016 at 7:19 pmI just discovered your game today. I just have to say congratulations on doing such an amazing job. The game looks beautiful and the gameplay looks amazing. You have truly created a work of art. I look forward to playing this someday.