4 ms·
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
by gHx8 6y ago
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 6y ago> 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 6y agoIn 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 6y agoApologies 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.
- chaostheory 6y agoIf you’re going to use something outside of Ink to provide most of the logic, is Ink the superior solution?
- gHx8 6y agoInk isn't a programming language, it's a markup for scripts that branch a lot or have text substitution rules. The FFI means that if a project hits ink's limits, you can go beyond them. Despite being a markup, ink is very close to turing complete. XML is another type of markup that relies much more heavily on external languages. So I think ink is quite powerful. (at least enough for most interactive fiction!)
- leejoramo 6y agoWow! Thanks for that response. I will check out Ink. Back in the 1980’s, I wrote a choose your adventure system based on plain text. I rewrote the system a number of times to learn new languages. Probably been 20 years since I touched my system. Maybe I will try using Ink with some of my narratives. Ink is obviously servers like orders of magnitude more powerful than anything I ever built.