[HN Gopher] Ink - Inkle's narrative scripting language
___________________________________________________________________
Ink - Inkle's narrative scripting language
Author : Tomte
Score : 120 points
Date : 2022-12-21 12:49 UTC (10 hours ago)
(HTM) web link (www.inklestudios.com)
(TXT) w3m dump (www.inklestudios.com)
| PaulHoule wrote:
| It strikes me as a very advanced successor to the PILOT
| programming language,
|
| https://en.wikipedia.org/wiki/PILOT
|
| 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.
| Tomte wrote:
| > Inform7
|
| Open-sourced this year: https://ganelson.github.io/inform-
| website/
| PaulHoule wrote:
| It's almost tempting to try to build something that looks
| like Inform7 but that lets you express,say, the rules for air
| traffic control or such.
| Tomte wrote:
| You mean as a layer on top of a rule engine, OptaPlanner or
| so? That would be cool.
| PaulHoule wrote:
| 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
|
| https://www.amazon.com/gp/product/B09ZBN2Y4W/ref=ppx_yo_d
| t_b...
|
| 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.
| hlship wrote:
| 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.
| bkav wrote:
| 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!
| scotty79 wrote:
| Really interesting language with very rich semantics
| https://github.com/inkle/ink/blob/master/Documentation/Writi...
|
| and flexibility of control flow I haven't seen since Atari BASIC.
| LunarAurora wrote:
| I've been thinking about using Ink, not for Interactive Fiction,
| but for Interactive Guides/Documentation.
|
| Wizard/Form Builders are just too constricting, and Static
| Pages/Doc Generators are too loose. It looks like a good middle
| ground.
|
| I'm still hesitating between different software. Ink's Markup
| format seems good for editing and revision control.
| gofreddygo wrote:
| Julia Evans [1] made some IF style debugging games [2],[3] on
| similar lines
|
| [1]: https://jvns.ca/blog/2021/04/16/notes-on-debugging-
| puzzles/
|
| [2]: https://mysteries.wizardzines.com/slow-website.html
|
| [3]: https://mysteries.wizardzines.com/connection-timeout.html
| joeld42 wrote:
| 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.
| andrewingram wrote:
| 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.
| slater- wrote:
| this seems like a brilliant idea.
| LunarAurora wrote:
| 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.
| adamrezich wrote:
| 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!
| mwcampbell wrote:
| Inkle developed a sample game using both Ink and the Ink Unity
| plugin, called The Intercept: https://github.com/inkle/the-
| intercept
|
| 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.
| slater- wrote:
| I love Ink! You can do so many cool things with it.
|
| Here's a "short" game I made using Ink, and a little bit of CSS:
|
| https://choco-wonka.web.app/
| SamBam wrote:
| That was pretty good.
|
| Do your various skill levels affect the game in any way?
| slater- wrote:
| 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.
| spdustin wrote:
| 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.
| franze wrote:
| when my son was 8 (or 9) he coded a few games in ink (all german)
|
| https://kianprov.neocities.org/der-anschlag
|
| https://kianprov.neocities.org/minecraft/
|
| https://kianprov.neocities.org/Der%20Kristall/index.html
|
| and the final one
|
| https://kianprov.neocities.org/schere-stein-tod/index.html
| (scissor stone death)
|
| i think its a great language to learn coding and making games, no
| need to deal with annoying assets or designs.
| dang wrote:
| Related:
|
| _Ink - inkle 's narrative scripting language_ -
| https://news.ycombinator.com/item?id=16925588 - April 2018 (22
| comments)
| adamrezich wrote:
| 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!!)
| 0xAFFFF wrote:
| Ink was born from the scripting language used for the game 80
| Days and the adaptation of the fantasy gamebook series Sorcery!
|
| 80 Days is a pretty great game on mobile actually, if you have a
| few bucks to spare.
| lelandfe wrote:
| Firm agree. 80 Days has great replayability, with a lot of the
| story options opening up after your first win.
|
| It is essentially a slightly steampunk choose your own
| adventure. I haven't played in like 7 years, time to redownload
| :)
| Tomte wrote:
| 80 days is very good, indeed, and with lots of replay value. I
| never got far with Sorcery!, though, I just keep dying.
| lukebitts wrote:
| 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.
| jameshart wrote:
| 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.
| scotty79 wrote:
| > Ink introduces are its version of 'lists'
|
| 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.
| scotty79 wrote:
| > concepts in its 'Tunnels'
|
| 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.
| jameshart wrote:
| You're absolutely right - I meant threads, which are parallel
| statemachines.
| [deleted]
| hlship wrote:
| 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.
| andrepd wrote:
| How does this compare to Z-machine games?
| hlship wrote:
| 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.
| icey wrote:
| 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!
| dvh wrote:
| People who write release notes of various softwares, please
| notice how:
|
| - title contain name
|
| - first sentence describe what it does
|
| - first image shows typical use
|
| This is how you write release notes or landing page.
___________________________________________________________________
(page generated 2022-12-21 23:01 UTC)