NPCs and dialog system!

Jul 062015

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 😀 ).

ScreenShot 2015_06_10 23;39;06001_cropped2

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):

ScreenShot 2015_07_03 09;34;59001_cropped

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… 🙂

  23 Responses to “NPCs and dialog system!”

  1. Yay, more updates, and great looking characters to boot 🙂 If you ever need actual voices, let me know.

  2. GoatDebug 😀

    • Well spotted, Oursique! 😀

      Cyrille wrote this custom debug command for me to pepper my code and it could only be named this way of course… 😛

  3. J’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 😉

    • Merci pour tes encouragements! Non, ce n’est pas facile tous les jours, mais ca reste tout de meme une formidable experience!

  4. a frog with a beard..

    yes.. i have seen everything. Thank you sir!! 🙂

  5. Super boulot, bravo !
    Vivement qu’il sorte 🙂

  6. Très intéressant tout ça. Et surtout une grenouille pirate, j’adore!

  7. Billions 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?

    • I 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!”

      • Blithering Bombardiers! That is probably what he meant! I am feeling silly now…

        • No 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. 🙂

      • Thanks 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.

    • Not a Cockroach but a True Bug! I’ll shut up now 🙂

      • That’s right! After working so hard to squash the game’s bugs it felt strange adding more in! Albeit real ones indeed… 🙂

  8. Why no ps4 version?

    • It’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.

  9. Ah, 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!

  10. I just love how this game is coming together. As always, quality update!

  11. You are progressing quite fast!
    As always this looks great 🙂
    What’s the tool for the dialog tree structure image?

  12. I 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.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>