Live data from Hacker News

Inform is a programming language for creating interactive fiction

ganelson.github.io

21–30 of 33 posts

Re: Inform is a programming language for creating interactive fiction

#21

Inform 7 code is interesting from a conceptual perspective —- “How could we build a programming language that looked like natural language?” In practice though, I think it ultimately falls into some kind of uncanny valley, where it’s just enough like natural language that it seems like a certain sentence or grammatical construction should work, but it doesn’t.

There is definitely a lot of fiddling with the text when writing, because you aren't really writing in English but instead a programming language.

On the other hand, the results can be remarkably readable, and in a fascinating way. As an example, here's a small game I wrote using it:

https://dwheeler.com/accuse/source.html

I don't know if there's a lesson to be learned, but as someone who's learned many programming languages, Inform 7 is intriguingly different.

Re: Inform is a programming language for creating interactive fiction

#22
post #11

I discovered Inform 7 last year and was impressed at the sophisticated platform it provides for writing interactive fiction in semi-natural English. In the 1980s there were plenty of books about writing text adventure games (as they were more widely called then) on home microcomputers, and I learned a lot about programming Acorn computers from Peter Killworth's "How To Write Adventure Games for the BBC Microcomputer…

> In the 1980s there were plenty of books about writing text adventure games (as they were more widely called then) on home microcomputers

Indeed. Adventure games were the most sophisticated games around. Companies like Infocom and Magnetic Scrolls ruled the roost. Teenagers like myself aspired to one day work there, which for me was a major reason to go and study AI (which was mostly parsers and tree walks at the time).

And then along came iD software. One day I walked into the shared computer facility of my university and everybody was playing Castle Wolfenstein and I remember thinking: o shit...

Fortunately AI did not turn out to be such a bad choice after all.

Re: Inform is a programming language for creating interactive fiction

#23

Inform 7 code is interesting from a conceptual perspective —- “How could we build a programming language that looked like natural language?” In practice though, I think it ultimately falls into some kind of uncanny valley, where it’s just enough like natural language that it seems like a certain sentence or grammatical construction should work, but it doesn’t.

If the end result is Literate Programming, that's worth learning their programming language, yes?

Re: Inform is a programming language for creating interactive fiction

#24
post #13

Earlier quoted context omitted.

Yes, it works well. The first time it misunderstood my query "write a very short story in Inform 7", but after clarifying ("I wanted a short story written as an Inform 7 program"), it wrote me the exact same story but in Inform 7. Not sure if it's because I said "very short", but it basically locked me into a cabin without letting me go anywhere. It did describe a fair amount of objects inside the cabin though.

It would be a real boon for non-programmers if you could build a text adventure game just using text dialogue with a system like that, interactively describing all the locations, objects and interactions. After that you could of course add AI-generated images, videos, music and voice (TTS).

It would be amazing yes. Debugging is the other skill you'd need.

Re: Inform is a programming language for creating interactive fiction

#25
Inform7 it's cool but the generated adventures are 'huge' and the might run slow on m68k based machines. If you like oop (much easier than Python, even a kid from Elementary could understand the basic syntax) and supporting legacy machines, inform6 is still maintained. IBG.pdf for an introduction to if6 and DM4 for mid-high complex stuff such as writting libraries and setting up non-standard objects with twisted grammars.

Re: Inform is a programming language for creating interactive fiction

#26

What are the most popular languages for writing IF? Why would I choose one over another?

Your primary decision is parser vs. hypertext, with Inform being the default choice for parser and (I think still) Twine for hypertext with Undum also being a popular choice. Most companies producing commercial IF have in-house tooling focused on their "house style", e.g. ChoiceScript for CYOA with "chunky" dynamic content versus StoryNexus (or whatever its modern iteration is) for a more fine-grained RPG-like approa…

CYOA is boring, it's just hypertext before the hypertext. Even the easiest if6/ZMachine adventure such as 9:05 has more choices and interactivity.

Re: Inform is a programming language for creating interactive fiction

#27
post #26

Earlier quoted context omitted.

Your primary decision is parser vs. hypertext, with Inform being the default choice for parser and (I think still) Twine for hypertext with Undum also being a popular choice. Most companies producing commercial IF have in-house tooling focused on their "house style", e.g. ChoiceScript for CYOA with "chunky" dynamic content versus StoryNexus (or whatever its modern iteration is) for a more fine-grained RPG-like approa…

CYOA is boring, it's just hypertext before the hypertext. Even the easiest if6/ZMachine adventure such as 9:05 has more choices and interactivity.

"More choices is better" is bullshit.

Re: Inform is a programming language for creating interactive fiction

#28
post #25

Inform7 it's cool but the generated adventures are 'huge' and the might run slow on m68k based machines. If you like oop (much easier than Python, even a kid from Elementary could understand the basic syntax) and supporting legacy machines, inform6 is still maintained. IBG.pdf for an introduction to if6 and DM4 for mid-high complex stuff such as writting libraries and setting up non-standard objects with twisted gram…

For some data on the game size (based on my implementation and analysis of a BBC BASIC four-room game "MINI" which I referenced in another comment and won't self-promotionally spam again...)

The source code for MINI weighs in at 4.6 K, saved in the tokenised form used by BBC BASIC.

In comparison, the Inform 7 source is around 3.3K in size. But that isn’t executable - it can be run in Inform 7, or it can be compiled into a “story file”, of which Inform 7 supports two formats. In the older, more portable, Z-Code format, I got a blorb (package) of 406 K; in the newer, more sophisticated Glulx format, I got a blorb of 602 K.

And to actually play the story file, you need an interpreter - for example, Windows Glulxe, an interpreter for (as the observant reader might guess) playing Glulx story files under Windows, is a further 275 K. Inform 7 can also produce a story file and bundled Javascript interpreter for a version playable in a web browser: for MINI, this bundle weighs in at 1.1 MB.

Re: Inform is a programming language for creating interactive fiction

#29
post #15
post #14

Earlier quoted context omitted.

What in particular makes it so compelling?

I tried Inform years ago, and finding Rosetta Code solutions in Inform 6 and 7 intrigued me. The '99 Bottles of Beer' solution was the first I looked at then[1]. This was even after I had played with NLP in the 90s. It seemed right and strange at the same time. This has been blown away by ChatGPT now! [1] https://rosettacode.org/wiki/99_bottles_of_beer#Inform_7

Does inform generate the story (like ChatGPT)? Explored the Inform website. Not sure what am I looking at.
Post reply on HN