Sponsored By

Writing Slapstick And Narrative As One

How to define "slapstick" dynamic scenes in a way that they are configurable, expandable and integrated with their narrative contents? A practical solution using dialogue flows.

Pietro Polsinelli, Blogger

February 23, 2021

7 Min Read
Game Developer logo in a gray background | Game Developer

(Or from Wilt to a composable story engine.)

I had this narrative design problem: how could I define my game's “slapstick” scenes that mix movements, actions, barks and dialogues without hard-coding behaviour in something linked but not organic to the narrative content?

Roller Drama's funny plot

In the past, I have used dialogues and configurations (in Unity, Scriptable Objects) in order to somehow keep the narrative and plot separate from code (so not hard-coded LOL) but for a “slapstick” game I need a more dynamic and integrated solution.

Roller Drama's athletes

I guess that every mid to large-sized studio has some ready solution for that, but there does not seem to be one ready out there available for all. Now having some kind of explorable quest space mixed with dialogues and choice-based narrative interactions seems like a common need.  I want to write new missions while keeping the prototype running, and also be free to add, turn on and off any of them. Now in order for this to work, each mission must be somehow “self-standing” in definition and contents.

A dialogue in Roller Drama

So I wanted to (1) be able to plug-in a new composite episode any time, without changing “architecture” and (2) have episode configuration *and* content be kept somehow “together”, so to make them maintainable and easy to change/evolve.

Rear Window's set

My little hopefully funny missions for my game in development (Roller Drama) are in the context of a side view of a fixed group of houses, a bit like Rear Window,

Roller Drama: the girl's house

and I mix absurd situations, little puzzles, and short dialogues (inspired also by Hap’s games).

Hap's Puzzles

EXISTING SOLUTIONS

In my previous game, Football Drama, I used the common schema of alternating dialogues (which could make you gain cards) and a separate mechanics (football matches).

Football Drama's timelines

This kept narrative and the game sports mechanics separate as experienced in play, just linked via cards; but in Roller Drama I want to go beyond that and mix narrative and missions, generating funny situations that are not resolved entirely in terms of dialogues or cards won.

Football Drama's cards

I checked for existing solutions, where narrative design in a way becomes level design (don’t even like the term level design but ok), and found these three (super cool) talks

Level Design Workshop: A Narrative Approach to Level Design
Writing and Narrative Design: A Relationship
The Shapes in Your Story: Narrative Mapping Frameworks

One of the takeaways of these talks is how scripted narrative plot evolution has to be linked with the *certainty of delivery*, otherwise, the player may make little sense of it all, showing how strictly connected mechanics and narrative need to be.

Certainty of delivery

(Image from Writing and Narrative Design: A Relationship)

But these talks point to inaccessible proprietary (and in the case of Telltale, buried) tools, and actually give no helpful technical explanation about how to integrate scene direction, tick and dialogue together. But I will try to!!!

(Side note: this problem sphere may link to the generational power of narrative design, and in this direction you should check the work of Emily Short e.g. Beyond Branching: Quality-Based, Salience-Based, and Waypoint Narrative Structures. But in my case, the problem is complex enough without dealing directly with procedural narrative problems.)

MY PROPOSAL

The solution I adopted uses dialogues and their branching structure for different purposes. There are many ways you can get a flow or dialogue system integrated with your development environment, and I assume you have that. I propose to use the same system to define the overall integrated logic of narrative and spatial events.

COMPONENTS

In my dialogue system, which is a set of directed graphs with logic-rich nodes, I use dialogues in two ways:

MISSIONS: As a definition for missions, computing (A) conditions for the mission to start, (B) mission scene setup and (C) state change at every mission “tick”.

PROPER DIALOGUES: these are just possible components of a mission.

On missions: the same “dialogue” is called many times by the story engine by issuing diverse commands (one for each of the A, B, C cases) or making the mission do a “tick”. A tick for a running mission can make it progress from one task to the following one. You can end a task from anywhere, within callbacks or even right in the middle of a contents say after a choice. A mission with the three commands in the sample screenshot:

MISSION ELEMENTS

The particular “dialogues” that define missions, when in action (case C) according to the active task can conditionally instruct the story engine to do stuff, and when a task is complete it will move to the next one or end the mission with (eventually partial) success or failure. What are the possible tasks and components?
Well in my case I need to say where NPCs should be, where they should go, when, what they and the narrator may say in the meantime, and also whether to open a full “proper” dialogue.
Inside each tick/task, there may be remarks by the Narrator (who is modelled as one of the actors), and by inserting them just in the flow I know when and where they should be presented. With callbacks I can have “certainty of delivery” and trigger the appropriate events. See a “ticking” GIF. (JIF? GHIF?)

Tick in action

(Well as Gamasutra makes GIFs static, here it is.)

PROPER DIALOGUES

Dialogues in the standard sense are just parts of a mission, and I define proper dialogues as flows distinct from those used for defining missions. Again there also for proper dialogues I use different commands to distinguish “setup” and the actual talking, as can be seen in the image:

Dialogue setup

Also here in the dialogue’s nodes you can put direction indications, like e.g. camera usage or NPC’s animations. They can get complex. \o/

Full dialogue

MIXED

Actually, I will need one more type of dialogue-that-is-not-just-a-dialogue: NPC’s “mind state” dialogues, where I maintain their relationship statuses (which are computed following some logic) and hence their “barks” when they meet you :D There will be a free mix of logic, state, tasks on tick and mini dialogues.

MORE

A mission can be articulated in sequential tasks, as we’ve seen above, or in several options available at the same time. In the latter case, your “tick” will keep hitting the same task, and the completion clauses will be computed (in AND, OR, or any combination) directly inside the task flow definition.
A ticking open task

One further advantage of this approach is that you can mix barks and narrator remarks inside the task definition logic. A mess? A maintainable, expandable mess! (Also more in general, how messy can be the way.)

CODE

I developed this solution in Unity by coding a little ticking story engine on top of a custom dialogue flow plugin (which is the amazing Outspoken by the amazing @demigiant) but the general idea can be used by anyone. Just call your dialogue’s flow with different “commands”, including one for the scene’s “tick”. I think you could indeed do this even using Ink or Twine.

The main advantage is that I am keeping conditions and logic “local” to contents and in specific, focused containers.

Maintainability means putting conditions, structure and contents in the same container. New missions can be plugged in any time and also changing them is immediate: \o/

A SAMPLE IN INK: Once the idea is clear, the implementation is not hard, a very draft start of one in Ink (as I can’t share one because it is built on a proprietary dialogue system).

So to see where all this ends up, subscribe to our forthcoming narrative sports game, Roller Drama: wishlist here, thanks!

P.S. This whole post could be called From Wilt to a slapstick story engine, thanks to @VerenaKyratzes for the hint!

 

 

Read more about:

Featured Blogs
Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like