Hacker News new | comments | show | ask | jobs | submit login
Writing interactive stories with Ink in Unity (primegames.bg)
100 points by Tomte 11 months ago | hide | past | web | favorite | 13 comments

Very cool. Every time one of these interactive fiction stories comes up, it reminds me I really ought to get back into Inform 6.

I've really been tempted lately to try embedding a z-machine interpreter in the Microsoft Bot framework. It'd be neat to play Zork in Teams or Slack

I did a similar thing for Facebook Messenger, though I adapted PyZork and expanded it with my own story (using a custom js object based language, slightly more verbose than Ink): https://adventure.kilianvalkhof.com/

I dislike Twine, and I unfortunately do not have enough to fill my days to be able to avoid reading a fair amount of Twine code. It's mostly terrible, even by hobbyist standards. It does however present an incredibly low barrier to entry, and that most of all is what I think this project misses. Telling stories in text should not require an IDE, and whatever form of programming is exemplified by that XML is one that I'll avoid at all costs. The other language choices are also dubious. I do not like feeling compelled to say nice things about Twine, but it's hard to find any comparative advantages in Ink.

You may find Ren'Py interesting. It's made for visual novels, but it can also be used for purely text, and the source code is just minimalist Python.


> I unfortunately do not have enough to fill my days to be able to avoid reading a fair amount of Twine code

I'm not sure what you mean.

I read a lot of bad game code written in Twine, for no particularly good reason, and I suspect there is some more productive way to pass time.

The XML isn't ink.

In addition to that, it doesn't seem that the IDE is necessary, either, despite what the GP implies.

Does anyone know of any possible alternatives? I'm just curious what the options are, because this seems like a lot of fun.

Okay, first of all, ink looks very, very cool. I hadn't heard of it and will definitely be checking it out. It'd be nice if there was a javascript compiler. Maybe it wouldn't be too hard to port.

I'm on an adventure game team. We started the game during a game jam. I'm the only developer. My team sort of wants me to use Unity but I absolutely refuse. I've put enough effort into proprietary platforms to know that it's pretty much a trap in the long run.

Anyway, during the game jam I stubbornly used Twine2, and was very let down. It didn't help that our writers were terrified of anything that looked or smelled like code. They wanted to use google docs!

Okay, so that meant that I had to copy and paste every revision into Twine manually all at the same time as I was trying to figure out the CSS and the branching/organization. That was too much. Twine was not made for collaboration.

And I thought because it was built with some variation of HTML5, that I'd easily be able to extend it with css and javascript. Nope, that wasn't the case! Twine is not made for extensibility. It even escapes HTML entities that I carefully wove into our text, transforming them into `>` and `<`. And doing modular dialog was just not possible. We wanted to create something dynamic, but with Twine it was very difficult. Twine was not made for incorporating dynamic dialog.

Twine was great as a proof of concept, but I've moved on to TiddlyWiki5. So far I'm feeling much better about that decision! There is a plugin called TiddlyMap that lets you treat TW5 content as a directed graph with multiple layers of edge and node types. It's very powerful: http://tiddlymap.org/

Maybe I can incorporate ink as a way of generating TiddlyWiki content?

I'm in the process of creating an feature for TiddlyMap that lets you visualize local linearizations of time-flows on these directed graphs. The goal is to be able to connect content together on a non-linear causal level (in the graph view), yet also to be able to edit it in a local timeline view. The proposed feature actually goes beyond just time editing. Check it out: https://github.com/felixhayashi/TW5-TiddlyMap/issues/270

Once our content is organized as a TiddlyMap graph, I can bring it to life using various existing javascript libraries for sound, graphics, etc.

Lastly, since TW5 integrates with dat & Beaker Browser, I'd like to create a p2p collaborative editor for tiddlywiki. I'm not imagining something with user authentication and a central server (like google docs). I'm imagining something where multiple users login to the same editing context via websockets and can pull/push to the collaborative version to each of their dat forks, similar to git. TW5 stores data as HTML, so it'd just be a matter of doing some smart diffing. TW5 already has an import feature, so even just using this could work!

Honestly, a collaborative dat editor would be useful outside of tiddlywiki! Could be a cool project for someone who is ready to tackle it.

> It'd be nice if there was a javascript compiler. Maybe it wouldn't be too hard to port.

The Inky editor is written in JavaScript, and apparently can "play" stories too:


I saw that, but noticed that it still seems to use the "inklecate" compiler, which is written in C#. I wonder to what degree it's actually dependent on that?

I wonder why Unity doesn't adopt the 'open source' approaches of UnrealEngine and CryEngine ? (not free software license though, a pitty)

Developed an AR game in Unity, but won't touch Unity anymore, it's a closed source vendor lock-in.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact