Hey folks,
I know the exhaustion must be real. I deal with it at work. The proliferation of everything with AI is taxing us all. Yes, AI implemented most of the code. I’ve reviewed every line of it, and I’ve made every architecture decision. Enough nerd talk. We’ll get to that later.
Let me tell you a tale of how this thing got started. I’ve been a writer my whole life. I actually started writing code before I started writing stories because, well, the language in programming is more limited, stricter, and easier to grok as a 10 year old. As I got older, that love of writing extended to real human language. It’s my favorite art.
I’ve had a story knocking around my head for the last 4 years. I’ve written lots of stories, and I’ve thrown it all away. I was determined to write this one. I knew I wanted it to be text-based. I knew I wanted it to be interactive. I knew I wanted it to be an RPG. I’ve been a DM/GM for a long time, and writing massively branching, on-the-rails type of campaigns has always been something that brings me great joy. The pain of writing for a table-top is that humans are a bunch of rogues who delight in derailing your shiny new locomotive.
Enter the story. I’ve been playing text based interactive fiction for a long time. I’m always looking for fun new stories, and I’ve run across plenty of good games that had me hooked until I hit a weird state bug or a scene that dead-ended or ran into a scripting issue. I have nothing but respect for the established systems that are commonly used, and those are what led me to create Talewright.
Talewright is heavily inspired by Ink, Twine, and ChoiceScript. Ren’py is also an inspiration, but I wanted to take it a different direction.
So what is Talewright? It’s a ground up, self-contained writing system that’s designed to stay simple. If all you want is a branching narrative, you don’t have to do anything else. You can make an entire story with just prose and diverts.
Here’s an example of the syntax:
=== the-beginning
@title The Beginning
The world blurs into existence. It's Thursday, you think. Hard to tell with the way the week has been going. You sit on the couch wondering what you had to do tonight.
Laundry? Yeah. That never ends. Dishes? Sure, the sink is a bottomless pit of hunger. Bills? Yup, got a whole stack of them right there.
Oh, right. You wanted to post about your new system, and you're worried it's not perfect.
"It'll never be perfect", the little voice in your head says.
"But it must be perfect", the big, ugly voice in your head says.
You hover on the forum, terrified. You're reading about release after release. AI this; AI that. Compilers, javascript, python, it's all a blur.
You wonder... Are authors actually clamoring for another tool?
* [Hell yeah they are] -> post-that-bad-thang
* [Eh, maybe not tonight. Could be more perfect] -> close-your-laptop
=== close-your-laptop
@continues
The big ugly voice wins. It needs to be more perfect. You can't post it tonight. You close your laptop, curl up in bed, and put on some brainless anime
-> END
=== post-that-bad-thang
@continues
Ya know what, maybe people do have the appetite for one more. You've put your heart and soul into this. You bolster yourself with the knowledge that you've made something that you're proud of, and you think it's worth posting.
The little voice inside your head lets out a tiny, squeaky cheer. You did it. You finally published something. You've made it real.
~ player:pride += 5
-> END
My first and only author test that wasn’t me was my 11-year-old. He was able to follow the docs, get his editing environment set up, write a story, and report some bugs that would have been a real pain.
My concept is that stories start simple and grow in complexity with the author. Authors should never have to write “real” code. Talemark - the custom DSL that powers Talewright - provides all the primitives most folks need to do complex things. State is handled for you. Hubs enable you to gather choices based on tags and conditions of varying complexity.
You don’t need anything other than a text editor to build and play a game. The files are local. The stories are yours. If you want to publish a story as a desktop application or a web hosted bundle, there’s a separate CLI that you can use to publish a fully self-contained, cross platform game.
Did I mention there’s RPG mechanics built in? By default, they’re disabled if you don’t want to write an rpg. If you do want to write an RPG, you simply flip a flag in the story manifest to enable it. You define characters, variables (text, numbers, or true/false), flags (only true/false), pronouns, items, factions, attributes, skills, triggers, and more in the manifest.
Images go in their own directory. More on that in the sample stories. The manifest for the “game” above would look something like this
game:
id: post-it
title: Post it. Or don't
version: 1.0.0
start: the-beginning
# This turns on the RPG features
# ruleset:
# base: rpg
characters:
player:
pronouns: he
first-name: Squid
last-name: Farm
That’s all you need to get started. Once you have that and a .tale file, you have a playable story. Zip it up, and you can play it in an existing player. Don’t have an existing player? I offer a hosted player that has no server side component. It runs completely in your browser locally. Your files never leave your computer.
Let’s get nerdy for a bit. This is the technology part of the talk
Tech Stack
This is 100% built in C# from the ground up. You don’t need .NET to play. You don’t even need .NET to publish. If you can zip text files, you can make a game playable.
The engine is a collection of libraries that build on each other. The core is the RPG mechanics, state management, event log, deterministic dice, and all the things that get tricky when you’re writing them yourself. It is completely standalone
Talemark is a custom DSL built on top of the core runtime. It uses a hand-rolled, regex-free parser that breaks files into scene-isolated syntax trees, tokenizes expressions and prose cleanly, and passes them through a static binder to catch broken links, typos, and state bugs before the story ever runs.
The narrative and runtime layers turn the AST (abstract syntax tree) into a game. This produces a presentation agnostic document that can be read by a front-end (doesn’t have to be mine, but there’s a caveat). This keeps the language separate from the core which keeps the core and the language separate from the presentation layer. This becomes important 6 months from now.
Then there’s the other layers. I have a cross platform desktop and web app built entirely in Blazor with C#. Both applications are served by the same core. Blazor web assembly (WASM) powers the web version, and Photino powers that same Blazor natively on the desktop via built-in webviews. That means that your desktop version will almost always look and act the same as the web version. There is no electron. There is no heavy javascript framework. There are only assemblies running in webviews.
I use Photino for the desktop application, and it has been a joy to work with.
The authoring experience
I wrote this with authors in mind. I wrote this with the hope and dream that anyone could pick this up and write an interactive story. That’s why my first external author was my son. I wanted to see if the instructions were clear enough, the syntax simple enough, and the play-test loop easy enough for someone with no prior experience to succeed.
That has been and remains my number one goal. You should be able to author a story or a game without feeling like the tooling and framework is in the way. The framework should feel like it’s helping you tell the story, not fussing at you as you go.
That’s why I wrote a language server, a command-line interface (CLI), and a VS Code extension to help authors with the fiddly syntax bits. As your story grows, you shouldn’t have to ctrl+f to figure out what you called that scene. The editor should just tell you.
It’s your story, split it across as many files as you want. However you like to organize your work, Talewright will let you (there are limitations, obviously).
Players shouldn’t have to find the bugs. Talewright’s compiler and language server utilize static analysis and a graph of the story to find common mistakes. Syntax errors are surfaced immediately. Compilation fails if you typo an image. Dead-end scenes are discovered through the graph and surfaced as a warning. Unreachable scenes are also reported as a warning.
Talewright is able to do this in real-time because the language server uses the same compiler that the apps do. All roads lead through the compiler. This makes managing state, scenes, and complex logic simple.
Testing is also made easy with the CLI-bundled debugger. It offers a hot-reload, state-overrides, tracked playthroughs, a visualized map with conditions on connections, and it’s all built on the exact same presentation layer that a player will see when they actually play your game
Oh lawd, he’s still going
Where I’m at today: My docs say that I’m waiting for a v1 launch before I do a language freeze to ensure backward compatibility. The last thing that I want to do is introduce this, have someone actually try to write a story, and then immediately break it with an update. As of today, I have 0 language changes planned. I’ve been writing a story and fixing only what I consider “showstopper” bugs in the authoring experience
Save? Yep, they work. They’re pretty much always backward compatible no matter what you change in the story.
Replay? Back and forward? Got that too. The event log in the core ensures complete deterministic replay. This prevents save scumming to game rolls, and it means that players can always time travel back to that choice they regret. There is no hard cap on replay. Again, there’s a caveat on that, but we can nerd out about that later.
Full history without side effect? You betcha.
The entire application is written with accessibility in mind. The web and desktop players should work with assistive tech. Even the debugger and the visual map are built with accessibility in mind.
What’s it missing
Well, to be frank, quite a bit compared to a lot of the options. I won’t pretend I have what I don’t. I’ve focused on things that I think were painful. I’ve focused on building a strong base for the future, and I’ve decided that it’s time for me to stop writing this for myself and get feedback from the community. That’s where you all come in. It’s time for me to stop tinkering and see what feedback the community has.
The things that I know it’s missing are:
- Full UI customization - You can write your own CSS and bundle it. You can even write your own javascript if you want. I do not have great documentation on this, and it isn’t something I fully support
- Talemark customizations and effects - Right now, the font you get is the font you get. The colors you get are the colors you get. There’s not much in the way of presentation that you can do in Talemark. You can bold and italicize things. There’s some text-manipulators built in that help you with common agreement, capitalization, pluralization, and pronoun gotchas.
- Pronoun forms are… verbose - This is a carry-over from early in the project when I was still trying to settle the syntax. I know it’s a problem, and I have some ideas on how I can make this more palatable
- Sound - I don’t offer anything
- Videos - Not supported, yet
- Gifs - Not supported, but you can use animated .webp
- Arrays, lists, and loops - I’ve purposely kept this simple to see where the demand is
- Partials and fragments - You can’t write something and inject it wherever you want. You theoretically could with variables. That would be ugly, and the text won’t be parsed as Talemark
- Text-input - I don’t offer dropdowns, textboxes, or any other standard inputs. This is, again, by design to keep things simple until I know what folks want. There is a one time character creator that offers custom names, pronouns, classes, and minimal stat modifications. It needs a redesign.
- The things you’ll tell me - That’s why I’m doing this
Enough tell, more show
Fine, fine, fine. Here’s the links
Marketing site - https://www.trytalewright.com/
Web player - https://play.trytalewright.com/
A sample story - Baked into the web player. Select “The Lost Relic”
A note about the illustrations and the baked in sample story - They’re AI generated. I’m not an illustrator. The story is AI generated and meant to be more of a tech demo, not a real story (see the source for the tech goodies - talewright/samples/LostRelic at main · squid-farm/talewright · GitHub )
Here’s a high level roadmap - https://github.com/squid-farm/talewright/blob/main/docs/roadmap.md
* See this post for my WIP game - Talewright - Yet another framework - #19 by squid-farm-actual
In addition to the roadmap, feel free to follow along with my issues, open your own, or even author a pull request. As a solo dev, this has been a daunting project - even with the chainsaw that is AI. I’d love to have collaborators on this project to bring in a different perspective
There is no AI in Talewright itself. The AI starts and stops at implementing the code I tell it to.
Wrap it up Joel
Talewright is designed for authors. It’s built to be simple. It’s built to stay simple. It’s built to make complex things look simple. It’s free. It’ll always be free. It’s MPL-2.0 licensed. That means you can do what you want with it. The bundled output is yours to do with as you please. The only restriction is that forks and code modifications must be kept open source.
It’s built to scale massively. It’s built to run fast. It’s built to give you a turn-key RPG system without the fiddly bits.
Another shout-out to the outstanding choices that are available to the authors. I cannot possibly over-emphasize how influential ChoiceScript, Ink, Twine, and Ren’py have been. Those systems show what a good narrative engine can and should be, and this project wouldn’t exist without them.
Last words, I promise
I’m looking for real feedback. I’m looking for folks who are willing to take a gamble and try to write something with yet another new system. I’m looking for experienced authors to help me sand down the rough edges and make this thing sing.
If you’re an author who uses assistive tech, I’d really love your help making sure that this stays accessible to all. I want this to be something anyone can pick up and publish a story with no matter who they are. I built this because I love art, and I wanted to build something that helps folks make art.
Talewright is ready, working, and sitting at v0.7.0-preview.1. With help from you all, this will be at v1 in no time.
If you made it to the end of this, thank you! If you check out Talewright and try it out, double thank you!
Edit: Added link to post containing the early demo of my game. Fixed a typo while I was at it


.