[HN Gopher] Ink 1.0 - Open-source scripting language for interac... ___________________________________________________________________ Ink 1.0 - Open-source scripting language for interactive narrative Author : Kinrany Score : 296 points Date : 2021-04-10 12:49 UTC (10 hours ago) (HTM) web link (www.inklestudios.com) (TXT) w3m dump (www.inklestudios.com) | WhatIsDukkha wrote: | Looks like there is an actively developed godot integration - | | https://github.com/paulloz/godot-ink | | and a emacs major mode - | | https://github.com/Kungsgeten/ink-mode | | There is an lsp implementation - | | https://github.com/ephread/ink/tree/language-server/inklecat... | | Seems like I should spend some time with ink! | hackily wrote: | Congrats on 1.0! | | I recently started developing a game in my spare time, and | discovered Ink, which has tremendously simplified development of | conversations and managing conversational state. | | I've found Ink to be quite flexible, If someone wanted to, they | could manage their entire game state with Ink. | | Live recompilation of my ink script in Unity will be very | helpful! | mellosouls wrote: | Very cool. I wonder if there is an avenue for using this with | something like GPT3; be interesting perhaps to see what it might | come up with, or how it might add speed/scale to the process in | some cases? | jeeva wrote: | Tom Kail (of Inkle) did a neat workshop on writing stuff in Ink | at a recent coding festival, if anyone wanted to try it out - | https://www.youtube.com/watch?v=SKlz2hcy8wU | travisluis wrote: | How does this differ from Twine? | jmd42 wrote: | Twine exports to HTML, while Ink plugs in to other game | engines/code as a kind of backend engine for handling narrative | and text | fudged71 wrote: | Isn't twine also being used as a backend engine for games as | well? | xrd wrote: | Is anyone doing something similar , or using this as-is, with | comics and graphic novels? Is this a different form of narration | when it is applied to video games? I'm curious if there are | discussions about how this is different or the same. | NortySpock wrote: | Check out Ren'Py | dang wrote: | Past related threads: | | _Ink - Scripting language for interactive stories_ - | https://news.ycombinator.com/item?id=26147329 - Feb 2021 (15 | comments) | | _The Intercept (2012)_ - | https://news.ycombinator.com/item?id=23244812 - May 2020 (4 | comments) | | _Writing web-based interactive fiction with Ink_ - | https://news.ycombinator.com/item?id=21794981 - Dec 2019 (9 | comments) | | _The Intercept_ - https://news.ycombinator.com/item?id=21538414 | - Nov 2019 (1 comment) | | _Ink - inkle 's narrative scripting language_ - | https://news.ycombinator.com/item?id=16925588 - April 2018 (22 | comments) | | _Ink: the scripting language behind 80 Days and Sorcery_ - | https://news.ycombinator.com/item?id=11269782 - March 2016 (18 | comments) | leejoramo wrote: | Can anyone compare Ink to Inform? I played with Inform many many | years ago and have always wanted to return to it. | Multicomp wrote: | Inform 7 is used to make Zork-style games. | | GET covid. GO WEST etc. | | Ink is more comparable to Branching narrative software like | Twine, or Visual Novel software like Ren'Py. | irrational wrote: | I am familiar with inform and zork (which auto-corrects to | dork ;-) but not with how that is different than branching | narrative software. How are they different or similar? | megameter wrote: | Branching narratives are like Choose Your Own Adventure | books. You can get 80% of the way to what Ink does with a | carefully programmed static website. But this is an | environment designed to author that, and to publish to game | engines as well. | | The main competition is Twine, which is more focused on a | self-contained deployment. Twine also got a huge update | recently with its "Harlowe" theme supporting storylets - | scenes that trigger from a pool or "deck" based on logic | you program. | jccalhoun wrote: | zork and other "parser" games would say something "you are | in a room with a table and a door to the north" and there | would be a cursor. | | Twine and "choice" games would say something like "you are | in a room with a table and a door to the north. Do you want | to look at the table or go to the door?" | anthk wrote: | You can omit "GO", the parser will understand "west" fine. | | Also, Inform6 is better suited for a "logical old-school" | programmer than if7, where using it for non-English languages | can be a huge mess. | Kinrany wrote: | On the software side, ink is open source and has C# and | JavaScript compilers, a Unity plugin and a separate IDE called | inky. | | Inform7 is not open source yet, although they had plans in | 2019. As far as I can tell, it's a single app that outputs its | own format that can be uploaded to https://www.ifarchive.org/ | | Disclaimer: I've never used either, ink just seemed more | legible. | skybrian wrote: | To add some detail, Inform 7 compiles to reasonably well- | documented portable binary formats that have been | standardized for decades, with the earliest versions dating | back to Infocom days. There are a variety of emulators, | including web-based. This is why games uploaded to ifarchive | many years ago still work. Even if an old game's source were | available, they were sometimes written in obscure genre- | specific programming languages that nobody uses anymore. | | The binary formats are specific to the genre, which is pretty | niche. Casual users are unlikely to have downloaded an | emulator even if it's easy to do, so a game will be bundled | with one when it's published to an app store. | | But as formats go, it seems like a pretty remarkable success | story for the long-term preservation of games, and it would | be neat if there were a similar file format that were more | general-purpose and more popular, much like we have for | images, music, and video. | gHx8 wrote: | Because ink is a type of markup language, using it to write | narrative is very easy. You're writing the script for your game | and ink will handle how parts of it connect to eachother. It is | also very portable owing to being plaintext with relatively | simple syntax. There are currently ports of it in both Unity | and Unreal, and many developers have used it in some capacity | for html/css/javascript games. Procedural generation can be | done in ink, however you may need to use the frontend language | to save them for later; ink does procedural text very well but | has a weak concept of objects. | | Inform7 is a declarative programming language with english-like | syntax. It's quite good compared to ink at simulating objects | with a lot of metadata. However, the runtime isn't quite as | portable as ink; as a result, Inform7 has no easily located | Unity or Unreal packages. Ordinarily, I would recommend Inform7 | where you need to process lots of content and randomly generate | things. But it seems in addition to having an arbitrary runtime | entity limit of 1000 things, those things must exist before you | randomize them. Although counterintuitive, procedural | generation is more challenging in Inform7 than ink! | | Use Inform7 when you need a language that can reason "because | Alice's relation to Bob is at -50, Alice hates Bob. Because she | hates Bob and he is walking nearby, she can trip him. If she | does, he will take a random amount of damage and Bob's relation | to Alice is reduced by 20." | | Use ink when you need a highly portable language that can | script /other/ frontend frameworks or languages. Ink has been | used in 2d games, 3d games (notably Heaven's Vault), on the | web, and on three different game engines (Unity, Unreal, | Godot). Ink is also very good at making variations on text and | tracking how often parts of the story have been visited. | | They're both excellent tools for interactive fiction, but they | excel at wildly different things. | riffraff wrote: | > It's quite good compared to ink at simulating objects with | a lot of metadata | | can you give an example? I have zero familiarity with IF | programming, but I would be very interested in understanding | this. | gHx8 wrote: | In inform7, you can do this: | | > A race is a kind of person. Dwarf, elf, and half-elf are | kinds of race. | | > A town has numbers called friendliness, services, | comfort, and population. Leadership relates a person to a | town. The verb to lead implies the leadership relation. "F | [friendliness] / S [services] / C [comfort] / P | [population]". | | > Rivalry relates various towns to each other. The verb to | be rivals with implies the rivalry relation. The verb to be | rivals of implies the rivalry relation. | | Then you can make a town like this: | | > Bremen is a town in Ten-Towns. "Founded by dwarf | prospectors, the sleepy town of Bremen sits on the west | bank of Maer Dualdon, at the mouth of the Shaengarne | River.". It has friendliness 3. It has services 1. It has | comfort 2. It has population 150. | | > Dorbulgruf Shalescar is a dwarf. Bremen is led by | Dorbulgruf Shalescar. | | And now inform7 can be used to query or act on all this | metadata: | | > Every turn when the player is in a town: repeat with town | running through towns: say "Rivals of [town]: [list of | towns that are rivals with town][line break]"; | | This is the kind of thing you have to work hard to | represent in ink because you only have functions, | variables, and lists (a hashmap<variable, boolean>). As you | add more metadata to inform7, it can make EXTREMELY | sophisticated queries or conditions like "list of weapons | that were in hidden rooms which are gilded". So for very | little work, you can have inform7 reason about whether a | player can 'wear' a specific item by checking what they're | wearing, how the item affixes to things, and what | attachment points you've defined (which can be as broad or | granular as you want). And as a bonus, it's also very | little code to comment on the player wearing a strange | thing (like pants on their head) or wearing colours a | specific character thinks clash with eachother. | | This kind of query is one of ink's notable weaknesses (and | requires quite a lot of lists or very clever lookup | functions to achieve). But, ink can leverage its frontend | (often a general purpose programming language like C# or | javascript) to provide that functionality. | gHx8 wrote: | Apologies that I forgot this line for the example above: | | > Bremen is rivals with Lonelywood, Targos, and | Termalaine. | | When you write it, you effectively get 3 pieces of | metadata for 'free' without any extra code: | | > Lonelywood is rivals with Bremen. Targos is rivals with | Bremen. Termalaine is rivals with Bremen. | kd5bjo wrote: | I haven't played with either of them much, but they seem to | take two fundamentally different narrative approaches. | | Inform is primarily simulation driven: You describe a world | model. Every user input translates into some action that | affects the world, and the world changing produces relevant | output. | | Ink is primarily narrative driven: You write the text as a | branching story, with a set of explicit options for each | branching point. Variables can be read and changed arbitrarily, | but have no meaning other than how the narrative uses them. | solson4 wrote: | Very cool. I'm working on an interactive fiction engine in my | spare time, and it's interesting to see how someone else chose to | manage the complexity that exponential branching starts to cause. | Their concept of knots makes a lot of sense for a video game with | narrative "hubs". Definitely like the text based approach, the | flow graphs that other engines use look like they get really | messy really fast. | offtop5 wrote: | I absolutely love the ink team, for releasing this. They have a | fairly decent Unity which is free and is more than good enough | for creating basic narrative games. It would still probably be a | good idea, to have a good grasp of unity before integrating it | though | asimpletune wrote: | Wow this is awesome. | | I think it would be really cool to write some documentation or | more interactive education using this tool. | 094459 wrote: | I have been thinking the same thoughts...now I've seen ink I | might need to give it a go | indigochill wrote: | I wrote my "portfolio" page[1] in a choose-your-own-adventure | style with Ink. Documentation would be pretty cool, might | experiment with that at some point. | | [1]https://maxsond.github.io/ | daniellarusso wrote: | Your soundcloud link did not work for me. | indigochill wrote: | Whoops, thanks for the heads up. I'd changed my Soundcloud | profile name and hadn't updated the site. Fixed now. | psyklic wrote: | Ink is great, and very extendable. I used it as the scripting | engine for a machine-learning-powered chat bot. | gHx8 wrote: | That sounds amazing! Where would be a good place to start | digging into chatbot tech? Specifically, I'm wondering how to | dynamically rewrite scripted dialogue and it is a deceptively | deep topic. | chrisweekly wrote: | This looks _amazing_! Thank you for sharing! | jackalo wrote: | Maybe I'm just old at this point, but I honestly thought this was | a reference to Inkscape which had it's v1.0 about a year ago, and | I became very confused. | jackalo wrote: | Just wanted to quickly add that I am in no way trying to steal | the thunder from this news, just referencing where my brain had | gone. | | All that aside, this looks like an incredible language to use | for some of my own projects. I have always been a fan of text | based adventures, and have played MUD's off and on for at least | 25 years at this point. Maybe I can put this language to good | use. :) | totetsu wrote: | from my blog notes on ink see also: | | " pubcoder[1] or apple ibook(killed) | | or kotobee or Twine which is from the Interactive Fiction | Technology Foundation. .. and used to make this cool interactive | browser experience burnt matches. more here" | | 1 https://docs.pubcoder.com/new/pubcoder_widgets_intro.html | | 2 https://www.kotobee.com/blog/how-create-interactive-ebook-gu... | | 3 https://twinery.org/ | | 4 https://pippinbarr.com/games/burntmatches/ | | 5 https://www.pippinbarr.com/2016/11/29/burnt-matches/ | nrjames wrote: | Also Yarn and Yarn Spinner | | https://yarnspinner.dev/ | nottorp wrote: | > and used to make this cool interactive browser experience | burnt matches. more here | | Does this "cool interactive browser experience" only work in | Chrome? I tried it in firefox and when i click on "snow" | nothing happens. | totetsu wrote: | It seems to work kind of okay in Firefox mobile. you've gotta | click on the colored snow. | tyingq wrote: | Chrome desktop, I don't see any colored snow. Here's a | screenshot: https://imgur.com/a/MovaQ1t | | Clicking on the little boxes with the word "snow." does | nothing. | totetsu wrote: | Row 6 column 2? | tyingq wrote: | Ah, thanks. Had to get my glasses. The background is #fee | where the other ones are #aaa, which is a bit too subtle | for my old eyes and monitor. | nottorp wrote: | Youngsters... turns out i had the same problem. | | Prolly designed for kids with perfect eye sight. | skybrian wrote: | I got a bit further and then it was just a hum and | clickable foreign(?) text, which when clicked shows other | foreign text, so I stopped. | tyingq wrote: | Clicking on "snow" does nothing in Chrome either. Clicking on | "home" does lead you to "end". I can't tell if that's what is | supposed to happen. | | Edit: Ah, okay. One of the "snow." boxes has a bg color of | #fee instead of #aaa. | totetsu wrote: | I think that means we always have the choice in life to | just open the door and look around and chose to stay home | and not start anything. There should be a snow with a | slight glow to the BG colour. ___________________________________________________________________ (page generated 2021-04-10 23:00 UTC)