The past couple of months have been a bit slow on the game dev front (what with a global pandemic and the release of Animal Crossing and all) but I have finally finished my branching dialogue editor.
SayWhat is a simple branching dialogue editor.
The initial approach for the editor was a web app.
While I did write a new ORM and a Next.js API helper in the process I ended up deciding against the web app.
The main reason being I wanted the dialogue project files to exist alongside the actual game code in the repository so that it could be versioned and tracked.
I might move it back onto the web when I have the time to implement user accounts and access management but for now, a desktop tool suites my needs.
The user interface went through a number of changes since the prototype I mentioned previously.
I reworked the 'everything is a node' idea and grouped items into two phases - general dialogue and options.
Each node would contain a number of 'lines' that would be spoken in order by the characters and then be followed up by the various ways to exit the node.
Each 'prompt' would either point to another node or to end the conversation.
Conditions and Mutations
Any line or prompt can have a condition attached. Conditions call out to the engine to check some state (the dialogue handler itself being stateless) and hide the line unless it is resolved as true.
Mutations call out to the engine and affect state. For example, a character might say "Here, have this thing" and then the engine could run a 'GiveThing' mutation which runs an animation and then updates the character's inventory before continuing the dialogue flow.
My engine pipeline only uses XML at the moment but I figured it was pretty easy to add in a JSON option just in case.
I made both formats to just be lists of sequences containing every line (or group of responses) as their own 'nodes'. Each of those nodes contains a single thing and then points to the next node in the chain.
The idea was that in the parser/engine I could just request an entry point (a sequence and node combination) and then step through each line from there.
You can grab a copy of SayWhat on Itch or check out the source on GitHub.