Besida (¨бесіда¨) ─ language for defining dialogue
Implementation:
- Besida: struct that is initiated with path to dialogue file (example) and parses it to dialogue nodes
- Dialogue node: holds speaker name and their speech (in form of events and in form of plain text)
- Event: enum that drives the design - pattern matching when iterating over events makes it very easy to execute actions in sequence as intended when writing dialogue in proposed format
Moving forward I want to add more events such as expressions/emotions of speaker, text speed control, text highlighting or styling in general. Also better ways to read actions when matching.
Here's an example with godot-rust where event_tick
is triggered by letter display timer to simulate typing: