Whisper
Reactive dialogue made easy!
A storylet engine that chooses the right dialogue for the right moment in your game!
Making your game world respond to what the player has actually done!
What is Whisper.
Reactive dialog made easy!
At some point in any project with reactive narrative, the logic for it ends up scattered everywhere. A line about the player’s low health lives in the health system. A “you’ve been here before” comment lives in the room transition code. A contextual NPC quip lives in… wherever you happened to be working that day. None of it is in the same place, none of it knows about the rest of it, and the more you add the worse it gets.
Whisper centralizes all of that. You write your narrative moments (storylets), define the conditions under which each one should be eligible, and then ask Whisper to pick the right one for the current moment in your game. Whisper evaluates everything against your game state and hands you back whatever fits. Your game logic doesn’t need to know what got picked, and your narrative doesn’t need to know anything about your game logic.
// "combat" is a pool. Ask Whisper for a line that fits the current moment.
var _line = WhisperSayTextSimple("combat", game_context);
// If whisper finds one (_line is not undefined), then show it with whatever dialog system you have set up
if (_line != undefined) show_dialogue(_line);
That’s the core of it. But there’s a lot hiding underneath.
Features.
Storylets can be filtered by tags (hard gates with AND/OR/NOT, plus soft “prefer” weights that bias picks without locking out everything else), or by predicate functions that check whatever game state you pass in as context. A companion line that only fires when the player’s health is below 25% and their relationship score is above 50 is just a predicate, one function, done.
Storylets track their own usage. A moment can be set to fire once ever, once per run, or to go on cooldown for a set amount of time before it’s eligible again. You can also tell a pool not to repeat the last thing it just said. All of that state saves and loads through Whisper’s save system, so a storylet that’s spent is still spent after a save/load cycle.
Text can contain insertion markers that get filled at resolve time, either with a fixed value or a randomly picked one from a list, so the same storylet produces varied output without you maintaining ten slightly different versions of it. A single storylet can also have multiple text variations that Whisper picks between randomly, which goes a long way toward making things feel less repetitive.
Verbs are the thing that makes Whisper fun. A line of text can contain embedded verb markers that fire registered callbacks when that position in the string is reached during a typewriter effect. So a narrative moment can trigger a boss spawn, a sound cue, a cutscene flag, or anything else you register, at a specific point during dialogue display, without your narrative and gameplay systems having to directly reference each other.
When something isn’t firing and you don’t know why, WhisperDebugMatch will tell you exactly why a storylet failed. Wrong tag, predicate returned false, cooldown hasn’t expired, hit its use limit, whatever it is, it tells you.
What Whisper isn’t.
It’s not a dialogue tree tool. Yarn Spinner and Chatterbox run a specific authored conversation. Whisper picks which moment is appropriate right now and hands it to you.
It’s not a narrative planning tool like articy:draft. articy is for organizing your content before it goes in. Whisper is the runtime that selects and executes it.
It’s not a full IF engine like Twine or a VN framework like Ren’Py. Those can be the whole game. Whisper is a piece that plugs into your existing game.
It’s not a scripted narrative language like Ink. Ink is great when you’re authoring a single story with branches. Whisper is for when your game is a pool of moments that unlock based on what’s true right now.
If you need your game to feel like it’s paying attention, that’s what Whisper is for.
GET WHISPER.
Whisper is also available as part of the Full Suite Pass.
Also included: Echo + Echo Chamber.
A purchase of Whisper also includes Echo, my GameMaker debugging toolkit, and it’s “sub-library” Echo Chamber, for free. Echo gives you level-based logging, tags, filtering, optional stack traces, history, file dumps and in-game debugging tools.
Required foundations this library uses
These supporting libraries are required by Whisper.
