And, if I may self-promote a bit: My colleague and I took that game and made it accessible to Windows screen reader users, as a proof-of-concept for integrating our AccessKit project in Unity, and non-Rust environments in general: https://github.com/AccessKit/the-intercept A truly reusable Unity plugin for AccessKit is in development.
I always enjoy looking at these weird little niche languages to see what interesting ideas they have. Ink's got some interesting parallel execution concepts in its 'Tunnels', but I actually think the most interesting thing Ink introduces are itsversion of 'lists', which aren't lists so much as sets, or maybe enumeration types, or maybe they're actually a dictionary with numeric values, or... maybe they're all of those things at once, using a single structure?
Also a bold - but it turns out sensible - choice, for a language oriented towards producing text to not really have extensive support for strings. Because it turns out that strings are a bad idea in most cases! What you actually want are rich templates.
I think the creator of [Dialog](https://linusakesson.net/dialog/index.php) - an IF language that draws inspiration from Prolog - gets the balance between text and code right; most text is ... just text. Code is in parenthesis (looks very familiar to a Clojure developer, funny enough). Indentation and whitespace is meaningless. It can be very expressive and doesn't get in the way.
They have exact semantics of GOSUB, RETURN, and POP from Atari BASIC.
->tunnnel-> is GOSUB tunnel_line_number
->-> is RETURN
->tunnel2-> within a tunnel is basically POP; GOSUB tunnel2_line_number
and
->knot is GOTO knot_line_number
I really like thinking about translating those weird languages into some proper language as directly as possible, but for Ink the host language must have been either Atari BASIC or assembler. Labeled break and continue in modern languages is not powerful enough, even PHP goto is not powerful enough (because it can't goto into a loop or a conditional block).
I mean technically you could do it by simulating goto with break and continue a and faking conditional and loops with this simulated goto, but still there would be limitation that goto target in Ink can be a variable.
Also the whole point of translating language into some proper host language is to able to mix the two as freely as possible.
I wonder how would modern version of goto based programming looked. What tools would we have for tracking errors in such code if we didn't abandon it altogether in favor of nested blocks and functions.
Ink for example tracks dangling ends of the story (not marked with ->END or ->DONE). Maybe goto based coding environment would also have equivalent of something like that. Being split into sections that need to overtly exit to some other section or program end on all the code paths.
I really like how by defining type you also define variable by the same name. I was craving for such feature in many scripting languages in my programming career.
Do it. I've used Ink for tutorials, and it's magic. It works so well. If you add a way to update changes while the app or game is running, it makes an amazing workflow for the tutorial authors or level designers.
I had the same idea a few years ago. We had a chat-bot we used for onboarding, and I considered trying to reimplement it in Ink. Didn't get the chance in the end, but still interested in the idea.
that's a really cool idea! a few years ago I was tasked with building a simple interactive guide to help users with a specific thing (setting up 2FA on their Steam account and connecting it to our website), and it wasn't too bad to throw together a bespoke interactive guide flow thing in html/js, but yeah, you're right, Ink would make something like this very easy. will definitely tuck this idea into the back of my mind for future use, thanks!
Yeah, you can also definitely do this on "no-code wiki" platforms like notion or coda. I like these two because you can literally build a visual DB of all your references, resources, and entities (with relations, backlinks…)
Ink has its advantages, including the text format and custom logic.
I’ve been using Ink for a personal project for the past 6 months, and it’s amazing in what it enables. But there are just so many small things I wish it supported, actual lists for one. Having to use external functions and recursion is annoying, but it also shows there’s not a lot of commitment to Ink being a “normal” programming language. Also classes, there are so many concepts that are better expressed as classes. Maybe even actual scopes instead of just two levels. Also arguments that don’t take up space in the global naming scope. Just a bunch of things we usually take for granted in programming languages.
they open up certain dialogue options as you go, but not as much as I would've liked. When I get to writing the later chapters, the stats are going to figure more heavily into the story.
I highly recommend Ink if you ever get the itch to write any kind of interactive story, even if you plan on implementing the story in something else later. once you get the basics of Ink down it's really easy to get the ideas flowing.
for example, my friend and I were working on making a narrative-focused video game awhile back, and I used Ink to rapidly prototype out the opening scene. for the end product (that never ended up materializing… at least, so far), the gameplay would be completely different, and probably not use Ink at all. but it felt great to bang out the opening scene I had in my mind, to set the mood, get in the groove of writing, and start thinking about how the writing and interactivity could intersect.
to demonstrate how useful and easy to use this is, here's the aforementioned prototypical opening scene, in generated HTML form: https://rezich.com/crimpyr (it's "over" when all you have left to interact with is "[TODO]" scenes) and here's the source: https://rezich.com/crimpyr/source.ink.txt (note that I am not, by any means, a professional writer!!)
I used Ink for a game I worked on (Tender: Creature Comforts). It’s pretty intuitive and very easy to learn, so if you have a kid who wants to give video game development a try, I’d really recommend this one.
The entire game wasn’t coded in Ink, so I’m not sure if it’s possible to do that or not, but you can get all of the dialogue done in it!
This is off-label use for sure, but we support Ink in Abbot. If you want to play around with it in Slack, sign up for a free trial at https://ab.bot then visit https://app.ab.bot/settings/organization/advanced and click "Allow Custom Skills" under "Bot Development Settings". Then you can create Ink skills and call them from chat.
Full disclosure, but we're probably going to deprecate Ink support soon because there are lots of little edge cases and warts that take too much time to support vs. how many of our customers use Ink. Still, fun to play with and you can do some crazy stuff!
Also I want to compare it to Inform7 which similarly offers the ability to make an ‘adventure’ game with a English language interface with a programming language that could be confused for English.
Inform7 internally works like a very primitive rules engine. The idea we had was to replace that with a RETE engine. Here's a book about writing an adventure game off a 1980's era rules engine
I tried writing an adventure game in Drools and was able to move between a few rooms but the big problem I ran into was the error messages from Drools didn't make a heck of a lot of sense since Drools mashes up the Java compiler in a complex way with its own syntax.
A really interesting system though would not just have a RETE engine but also a theorem prover. Lately, I have been doing stuff with OWL in which you can define an ontology with not-so-expressive rules and be able to prove its consistency or inconsistency, once you add math to first-order-logic all you can do is say that the prover ran for six hours and didn't find any inconsistencies.
The appeal that Inform 7 adds to this is that it does a very good job of providing a world definition language that looks like English.
I've already mentioned [Dialog](https://linusakesson.net/dialog/index.php) above; you seem primed to check it out; Dialog is a mix of ideas from Inform7 and Prolog. Crazy, and it seems to work.
Here's [1] a playable transcription of the original Oregon Trail (1971) source code (BASIC) into Ink. The project really gave me an appreciation for structured programming (e.g. loops, conditionals) which was once controversial [2].
It’d be interesting to see the intersection of AI-generated text+code and Ink. ChatGPT could go beyond writing short stories, and produce larger-scale works of interactive fiction.
Your interactions are limited to choosing from a list of available options; there's no concept of rooms, or verbs, or inventory - just a "knot", a kind of node in a tree of dialog. However, there can be a lot of state, which can control, or flavor, the available options at any knot.
And, if I may self-promote a bit: My colleague and I took that game and made it accessible to Windows screen reader users, as a proof-of-concept for integrating our AccessKit project in Unity, and non-Rust environments in general: https://github.com/AccessKit/the-intercept A truly reusable Unity plugin for AccessKit is in development.