[Review / Vent] Inform7: Making your own Interactive Fiction

Discussion in 'Gaming' started by ShelLuser, Mar 10, 2018.

  1. Hi gang!

    I can't sleep :(, but I know exactly where it's coming from. The past weeks have been a little hectic for me, the last week especially because of some Internet problems, but some stress was mostly caused because of work related issues. So now that some projects have finally finished I kinda let go this evening and as a result.. now I can't sleep :D

    Sleeping for 6 -5 hours before an important meeting the next day? No problem! Getting plenty of sleep at the start of a relaxing weekend? :confused: Oh well, that's why we have this place! :cool:

    So yeah... I started this story in few different ways and threw away all of the concepts so let's try again :D

    Text adventures

    When I started gaming I did so on my trusty Commodore 64, and I had tons of games. At least 6 floppy boxes filled to the brim with software (5.25" floppy disks) where 5 of them were all filled with games. Just for context: one box contained at least 30 - 40 disks.

    Although I enjoyed many different genres I especially enjoyed RPG games, simulators and text adventures. And it's that last part I want to talk about. Games like Zork (I, II and III), Starcross and Suspended (all produced by Infocom) were some of my all time favorites. What made those games more special than your regular text adventure was that time actually was an important factor in the games. Also you could actually interact with others figures in the game.

    But what is a text adventure?

    I suppose I'm getting ahead of myself here ;) A text adventure is just that: a game where the computer writes out a story and where you have to give it commands in order to get through it, which usually evolves around finishing a quest. A game is usually made up of several locations where some of them provide you with puzzles to solve. For example: one location could have a locked door which you need to somehow unlock, and the key for that door could be hidden somewhere else.

    Let me give you a simple example:

    ShelLuser's residence
    You landed on ShelLuser's residence (# 3544). You're on a gravel path and can see a wooden porch in front of you (North). West of you is a strange looking contraption, it looks like some sort of redstone machine. To the north-west is where the gravel path leads downwards

    >n

    The Porch
    You're on a wooden porch in front of a large mansion. Notable exits are south (this leads to a gravel path in front of the mansion) and north (this goes inside the mansion).

    You can see a sign here.

    >look sign
    The sign says: "Thank you to ShelLuser from Empire Minecraft".

    >
    Now, this may look pretty simple and straightforward to you, but don't let that fool you! One of the reasons why the Infocom adventures were so popular (apart from the usually awesome storyline) was the game engine. You could actually interact with characters, sometimes give them commands to perform (which they would then do) and most of all: many adventures even had a sense of passing time.

    A very well known adventure is 'Suspended'. Here you control a computerized entity which suddenly wakes up due to an earthquake. It is up to you to fix whatever is causing all the ruckus. To that end you have 6 robots at your disposal: Iris (a robot which can see things just like we do), Waldo (a robot which can interact with items, but it only has a sonar to check its surroundings), Sensa (a robot which senses magnetic and electronic impulses), Auda (a robot which can only hear things), Poet (a robot which can sense electrical flows, it communicates in a poetic way) and Whiz (a robot mostly used for interfacing with the main library computer).

    The fun part is that you can tell a robot to go somewhere, then interact with another robot and during that time the first will continue its travel and report when it's in the room you send it to.

    Now, over the years the interest in text adventures steadily declined, although there are still plenty of people enjoying them. Like myself. I have downloaded most of the Infocom adventures and I'm using an open source emulator called Frotz to sporadically play them.

    But playing an adventure is one thing... creating one, that's where the real fun can happen.

    Inform 7

    Over the years there have been many editors released but they all shared one common problem: in order to use them you'd had to learn a completely new programming system. Maybe fun if you're really interested in this stuff, but for a casual player like myself? No way.

    So then I discovered this program last week:

    Inform 7, an open source design system.

    This program is amazing. First, as you may notice, it allows you to build your own text adventures (which are now called 'Interactive Fiction') but you can build those while simply using English sentences! The sentences have to be written in a specific way in order for Inform 7 to understand all the instructions, but once you get the hang of it you can actually build an area in a really short time.

    But it doesn't stop there of course... Although Inform may refer to itself as a design system you can actually consider this to be a full blown programming environment. You can create rooms, you can create actors, you can instruct those actors to behave in a certain way. You can set up relationships between actors, you can add items for the player to interact with.

    And because you're using text to describe your actual game the sky is literally the limit here. And even that doesn't have to stop you because it's quite easy to build yourself a space adventure if you want to!

    A complete IDE
    Do you need to know how things work? Just check the documentation!

    IDE stands for Integrated Development Environment, and that's exactly what this is all about. Inform 7 gives you all the tools you need in order to make the best adventure possible. First it contains a complete manual, as shown above. It actually has 2: Writing with Inform fully explains how the program works and what you can use to write your own adventures. The Inform recipe book on the other hand is more useful as reference material since it contains tons of examples which have been used in real adventures.

    But Inform 7 also provides you with a ton of debugging tools. So: tools which can help you to keep a complete overview of the things included and happening in your adventures. In the screenshot above I'm showing the map which gets automatically generated, but there's much more. Everything you create (from actors, rooms, items to variables) can be looked up in the Index to check up on their exact values. And if something needs to be changed then your source code is but one click away.

    Seriously: working with Inform heavily reminds me of working with NetBeans (my favorite Java IDE). Simple keyboard shortcuts to switch between panels and panes, an easy way to move through your sourcecode (for example: arrow keys move your cursor through the code whereas control + arrow keys move the code up and down) and most of all: a complete set of documentation as well as a generated index which can show you some really complex game mechanics.

    So how does it work?

    Now, I'm not going to explain Inform 7 in every bit of detail (this would turn into an essay otherwise, the language honestly is that complex) but basically it boils down to you programming an adventure using plain English. Defining actors, rooms, speech tables (= tables which provide the text which some actors use to say to the player)... it's all done using easily understood sentences.

    Once you've set up a basis you can then compile your story after which Inform will check the syntax, compile it and then actually start playing it (as I've demonstrated above). This allows you to test your work. When you're fully satisfied you can provide any release information you want, compile your program once more and then you'll eventually get data file which can be used by several freely available players (Frotz is a well known program for that).

    An IDE build with the IDE

    One of the most impressive parts of Inform 7 is that most of what you see here has actually been programmed using Inform 7 itself! The documentation, the extensions, the main tabs.. This leads us to another awesome feature: extensions. You can use pre-made extensions (or program them yourself of course) and some of these extensions can do some pretty complex stuff.

    For example: everything I showed you above was actually provided by an extension:


    And if the extensions which are provided with Inform 7 aren't enough: not to worry! There are at least 3,000 more extensions available for download on the Inform website.

    Fully open source!

    Last but not least: Inform 7 is an open source project, and has been released under the GPL; the GNU Public License. Which in this case means so much that it's fully free of charge. It is available for all major platforms, but not every platform provides a GUI (like Linux for example).

    But if you want to try something else and test your skills in applying logic to create certain puzzles then this environment is for you!

    Summing up

    Inform 7 is a ridiculously extensive development environment specifically designed for programming Interactive Fiction, or text adventures. But it doesn't have to stop there, it can actually do a whole lot more. Some schools have even used Inform 7 to provide students with an easy way to interactively skim through study material, or to use it for building their own projects which would then introduce them to some very basic programming techniques. Things like using variables, looking up information in tables, writing logical behavioral rules....

    If this sparked your interest then I'd definitely recommend that you check out the Inform 7 website sometimes. Who knows, you might actually learn something new :)

    Thanks for reading!
  2. That's really cool!! :eek:

    I've wanted to host a text adventure forum game for a while, but I'm afraid it'll take too much time, so I feel like waiting for summer, but then again, in summer I might have even less free time, on some days, depending on what kinds of things I'm going to do.
    Anyway, mine would be a very simple one, where I've got a two-dimensional grid, with squares, and players can move to an adjacent square every move. Some squares will have hazards to kill you, and you'll have to restart. Chests with prizes will be hidden throughout, the first, of maybe the first three people to open a chest will get the prize. There's also simple crafting involved: you'll drown in water until you get wood to make a boat, and you won't be able to get past enemies unless you craft a sword.
    I'm not sure on all the details yet, though, and I'm really not sure if I ever will start really planning it. The thing is I am also afraid that there wouldn't be enough people truly involved, who would be keeping track of the environment and their own character, and if they play well other's characters as well (as the world is identical for everyone, so you can learn from other's progress or mistakes).
    Eviltoade likes this.
  3. These are a lot of fun. This app reminds me of early multiplayer text adventures, called MUD(s). Some of these were very advanced with classes, spell kits, scripted adventures etc.
    https://en.wikipedia.org/wiki/MUD
    607 likes this.
  4. If only people were ever interested in the stuff I did lol
    607 likes this.
  5. How do you mean?
  6. Everything I do here anymore, no one really cares about lol.
    607 likes this.
  7. Played a number of the Infocom games myself on the same platform (C64).

    I typed for hours trying to figure out where I had to go, what I had to do and what instructions the text adventure understood. Back then I did not have access to the world wide web, just QuantumLink (C64 precursor to AOL) and the local BBS's (FidoNet). Resources for finding "walk-throughs" were limited, particularly when a game was first released.

    Brings back lots of good memories. Thanks for the post and the information on the IDE, Inform 7. I will have to check it out.

    BTW: Like you, I enjoyed Suspended; but for some reason the one I remember the best is the Leather Goddesses of Phobos. I made sure my wife was not looking over my shoulder when I was playing that one. :)
    607 likes this.
  8. That does indeed not look EMC-appropriate. :p
    Sandakumaran likes this.