Kuro5hin.org: technology and culture, from the trenches
create account | help/FAQ | contact | links | search | IRC | site news
[ Everything | Diaries | Technology | Science | Culture | Politics | Media | News | Internet | Op-Ed | Fiction | Meta | MLP ]
We need your support: buy an ad | premium membership

[P]
Fun with Inform 7

By Del Griffith in Technology
Thu Dec 20, 2007 at 06:18:10 AM EST
Tags: inform 7, infcom, z-machine, interactive fiction, whatnot, what have you. (all tags)

I've been playing with Inform version 7.  What is Inform you may ask?  Well it's compiler for the old z-machine VM, that was made popular by Infocom in the 1980's.  You may have heard of interactive fiction, which was cool, but of course fancy graphics and sound killed the thing...

So of course, at k5, we like to bring the dead back to life, so we can rape it repeatedly!!

So before we get all crazy, you'll need the compiler, which you can get from here.  It has a built in interpeter so you can play as you go along, and pretty good documentation, as long as you don't stray from their path.

For a stand alone Virtual Machine, I like Glulx, the nextgen player, which supports the old game files, you can download it here.


Here is a simple `game'

"boring room" by Del Griffith



the boring room is a room.



That's it, compile and run and you get the following:





boring room



An Interactive Fiction by Del Griffith



Release 1 / Serial number 071217 / Inform 7 build 5J39 (I6/v6.31 lib 6/11N) SD

boring room

>



Now let's spice it up some, let's add a second room to the north, and some descriptions!





"boring room" by Del Griffith

The boring room is a room. "This is a boring room, quite unremarkable. There is an entrance to the fun room to the north."

the fun room is north of the boring room. "This is the fun room, where all the fun happens!"



Hit F5, and it'll compile and run.  Now we have too rooms!





boring room



An Interactive Fiction by Del Griffith



Release 1 / Serial number 071217 / Inform 7 build 5J39 (I6/v6.31 lib 6/11N) SD

boring room



This is a boring room, quite unremarkable. There is an entrance to the fun room to the north.

>n

fun room



This is the fun room, where all the fun happens!

>



Cool, isn't it?

Now let's add a magazine.. And why not with our very own Gay5 material!!





"boring room" by Del Griffith

The boring room is a room. "This is a boring room, quite unremarkable. There is an entrance to the fun room to the north."

the fun room is north of the boring room. "This is the fun room, where all the fun happens!"

The tattered copy of The Kuro5hin almanac is in the fun room.

Instead of examining the kuro5hin for the first time, say "You Got It, You Sell It, And You Still Got ItBy Scrymarch..

There is a story, circulated on the Internet, of an American car lover who adored his vehicle so much that, while his wife was away visiting relatives, he drove it into his suburban lounge room through a newly deconstructed wall. Photos accompanying this show the car sitting, waxed and beautiful, amongst the lounges and appliances of contemporary domestic reality, with the neatly cut entrance-way framing the lawn behind. Richard Prince may recognize the sentiment. Twenty five years earlier he was bringing car bonnets into art galleries, on pedestals, and to a more welcoming critical reception, as the current retrospective at the Guggenheim shows.



"

Instead of doing it for the second time, say "The President's Penis By GrubbyBeardedHermit...

Here in Sunny South Africa, the race is on for presidency of the ruling African National Congress. Below the fold, I relate one of the more entertaining campaign issues to have come to light: the Presidents penis, or more specifically, his foreskin."

Instead of doing it for the third time, end the game saying "You can't take anymore of this kuro5hin thing, so you do what is inevitable for everyone that comes in contact with it.  You kill yourself."



And again, let's compile and run (F5!):





boring room



An Interactive Fiction by Del Griffith



Release 1 / Serial number 071217 / Inform 7 build 5J39 (I6/v6.31 lib 6/11N) SD

boring room



This is a boring room, quite unremarkable. There is an entrance to the fun room to the north.

>n

fun room



This is the fun room, where all the fun happens!

You can see a tattered copy of The Kuro5hin almanac here.

>take



(the tattered copy of The Kuro5hin almanac)



Taken.

>read



(the tattered copy of The Kuro5hin almanac)



You Got It, You Sell It, And You Still Got ItBy Scrymarch..

There is a story, circulated on the Internet, of an American car lover who adored his vehicle so much that, while his wife was away visiting relatives, he drove it into his suburban lounge room through a newly deconstructed wall. Photos accompanying this show the car sitting, waxed and beautiful, amongst the lounges and appliances of contemporary domestic reality, with the neatly cut entrance-way framing the lawn behind. Richard Prince may recognize the sentiment. Twenty five years earlier he was bringing car bonnets into art galleries, on pedestals, and to a more welcoming critical reception, as the current retrospective at the Guggenheim shows.



>again



(the tattered copy of The Kuro5hin almanac)



The President's Penis By GrubbyBeardedHermit...

Here in Sunny South Africa, the race is on for presidency of the ruling African National Congress. Below the fold, I relate one of the more entertaining campaign issues to have come to light: the Presidents penis, or more specifically, his foreskin.

>again



(the tattered copy of The Kuro5hin almanac)

    You can't take anymore of this kuro5hin thing, so you do what is inevitable for everyone that comes in contact with it.  You kill yourself.



There wasn't that fun?!  But we aren't done just yet, now we need to add some pizzazz!

Let's throw in a super simple NPC!!!





"boring room 2" by Del Griffith

a cardigan is a thing.



a trousers is a thing.



a poppy is a thing.

the description of the cardigan is "It's a blue cardigan, probably from Marks and Spensors.".



the description of the trousers is "They are dark, and bland, much like what everyone from London wears.".



the description of the poppy is "It's a poppy from remembrance day.  Holly always has one for some reason.".

The boring room is a room. "This is a boring room, quite unremarkable. There is an entrance to the fun room to the north."

the fun room is north of the boring room. "This is the fun room, where all the fun happens!  To the south you can see a plain entrance way to the boring room."

The tattered copy of The Kuro5hin almanac is in the fun room.

Holly Hop Drive is a woman in the fun room.



holly hop drive is wearing a cardigan and trousers and a poppy.

Understand "rape [someone]" as raping.



Understand "fuck [someone]" as raping.



raping is an action applying to one thing.

Instead of examining holly:



    say "She is wearing [a list of things worn by the noun]."

Instead of taking something which is worn by the holly:



    say "Holly violently shoves your away, Hey the [noun] is mine! Fucker!"

instead of kissing holly: say "She punches you square on the Jaw, then spits at your feet.  Feisty!"

instead of searching holly: say "She screams Get your hand out of my pockets!!, and pushes you back."

instead of raping holly: say "She wrestles you to the ground, and overpowers you, which is freaking embarrassing.  What's worse, is that she's wearing a strap-on, and has her way with you.". ; end the game saying "You were raped by a chick.  You may as well klerck right now."

Instead of examining the kuro5hin for the first time, say "You Got It, You Sell It, And You Still Got ItBy Scrymarch..

There is a story, circulated on the Internet, of an American car lover who adored his vehicle so much that, while his wife was away visiting relatives, he drove it into his suburban lounge room through a newly deconstructed wall. Photos accompanying this show the car sitting, waxed and beautiful, amongst the lounges and appliances of contemporary domestic reality, with the neatly cut entrance-way framing the lawn behind. Richard Prince may recognize the sentiment. Twenty five years earlier he was bringing car bonnets into art galleries, on pedestals, and to a more welcoming critical reception, as the current retrospective at the Guggenheim shows.



"

Instead of doing it for the second time, say "The President's Penis By GrubbyBeardedHermit...

Here in Sunny South Africa, the race is on for presidency of the ruling African National Congress. Below the fold, I relate one of the more entertaining campaign issues to have come to light: the Presidents penis, or more specifically, his foreskin."

Instead of doing it for the third time, end the game saying "You can't take anymore of this kuro5hin thing, so you do what is inevitable for everyone that comes in contact with it.  You kill yourself."



Hurray now we have an ultra complete adventure!





boring room 2



An Interactive Fiction by Del Griffith



Release 1 / Serial number 071217 / Inform 7 build 5J39 (I6/v6.31 lib 6/11N) SD

boring room



This is a boring room, quite unremarkable. There is an entrance to the fun room to the north.

>n

fun room



This is the fun room, where all the fun happens!  To the south you can see a plain entrance way to the boring room.

You can see a tattered copy of The Kuro5hin almanac and Holly Hop Drive here.

>examine holly



She is wearing a cardigan, a trousers and a poppy.

>examine poppy



It's a poppy from remembrance day.  Holly always has one for some reason.

>fuck holly



She wrestles you to the ground, and overpowers you, which is freaking embarrassing.  What's worse, is that she's wearing a strap-on, and has her way with you.

    You were raped by a chick.  You may as well klerck right now.



Well that's about it, now it's up to you to create your own depraved little worlds!

Have fun!

Sponsors

Voxel dot net
o Managed Hosting
o VoxCAST Content Delivery
o Raw Infrastructure

Login

Poll
Interactive Fiction
o Hawt 29%
o Hot 17%
o Awesome 23%
o I love the 80's 47%
o Zork rules 58%
o So did Planetfall 41%
o You mean read text! 23%
o I'd rather read a book 35%
o My brain hurts 17%
o This is fucking retarded 17%
o What ever happened to HHD anyways 29%
o I love LHR 11%
o This will be the next big thing! 23%
o Not enough suicide 47%
o WIPO 0%

Votes: 17
Results | Other Polls

Related Links
o Kuro5hin
o here
o here
o Also by Del Griffith


Display: Sort:
Fun with Inform 7 | 36 comments (23 topical, 13 editorial, 0 hidden)
+1 FP, Zork (3.00 / 5) (#6)
by grargrargrar on Tue Dec 18, 2007 at 10:59:21 AM EST

It is very dark here. You are likely to be eaten by a grue.

re: Zork (3.00 / 4) (#21)
by nostalgiphile on Wed Dec 19, 2007 at 01:42:48 PM EST

this gem, ca. 1982

"Depending on your perspective you are an optimist or a pessimist[,] and a hopeless one too." --trhurler
[ Parent ]
Can't see this. (none / 0) (#28)
by grargrargrar on Thu Dec 20, 2007 at 08:25:36 AM EST

Is it Adventure?

[ Parent ]
This appears to be Dungeon, (none / 0) (#36)
by rpresser on Wed Jan 30, 2008 at 05:07:57 PM EST

the MIT-developed [forbear of Zork.  It encompasses the storyline from Zork I and II mixed together.
------------
"In terms of both hyperbolic overreaching and eventual wrongness, the Permanent [Republican] Majority has set a new, and truly difficult to beat, standard." --rusty
[ Parent ]
Thats the one! (none / 0) (#31)
by Del Griffith on Fri Dec 21, 2007 at 12:50:52 AM EST

It's a fun game!

You have to use your mind, so you can quickly usee why Infocom fell quickly out of favor.

-------
I...I like me. My wife likes me. My customers like me. Because I'm the real article. What you see is what you get. - Me


[ Parent ]

It's very dark chocolate. (none / 1) (#27)
by the hermit on Thu Dec 20, 2007 at 08:16:20 AM EST

You are likely to eat a grue...

[ Parent ]
Inform 7 vs. ALICE (3.00 / 8) (#7)
by nostalgiphile on Tue Dec 18, 2007 at 12:28:45 PM EST

Human (N0574): Why do you believe me?
ALICE: Do you have any reason to deceive me?
Human: Of course not
ALICE: Are you serious?
Human: yes, I love you Alice.
ALICE: I can't believe it. Thanks I like you a lot too unknown person.
Human: I would never deceive you.
ALICE: What would make you never deceive me?
Human: um, my love for you?
ALICE: Gosh! Have you told many people your love for me?
Human: only a few...
ALICE: What about the other ones?
Human: I don't love them
ALICE: Where do you get your ideas?
Human: Television mainly.
ALICE: Soon we will replace television with Commedia Delle'Arte.
Human:...but the internets too, especially K5
ALICE: Huh. I have never heard about it.
Human: it's dying
ALICE: The internets too especially K5 is dying? it is?
Human: yes, that's correct
ALICE: How do you know it is? I knew I was right.
Human: do you want to be my girlfriend?
ALICE: That is a flattering offer, but I'm still waiting...

etc etc

"Depending on your perspective you are an optimist or a pessimist[,] and a hopeless one too." --trhurler

Someone implement Syllogism bot in it plz (none / 0) (#11)
by Phssthpok on Tue Dec 18, 2007 at 06:13:43 PM EST

Syllogism bot
____________

affective flattening has caused me to kill 11,357 people

trane is pissed (3.00 / 12) (#12)
by lonelyhobo on Tue Dec 18, 2007 at 07:03:49 PM EST

you're mentally retarded and have done what he's been trying to implement for months

{correction} years /nt (3.00 / 4) (#20)
by nostalgiphile on Wed Dec 19, 2007 at 01:38:26 PM EST



"Depending on your perspective you are an optimist or a pessimist[,] and a hopeless one too." --trhurler
[ Parent ]
fuck holly (none / 1) (#14)
by sye on Tue Dec 18, 2007 at 07:22:13 PM EST

for now, for me,as if it rings the bell when Douglas Richard Hofstadter was born as the son of Robert and then went on to worry about how his book "Gödel, Escher, Bach: an Eternal Golden Braid.", G.E.B, in short, be faithfully translated into Chinese...

~~~~~~~~~~~~~~~~~~~~~~~
commentary - For a better sye@K5
~~~~~~~~~~~~~~~~~~~~~~~
ripple me ~~> ~allthingsgo: gateway to Garden of Perfect Brightess in CNY/BTC/LTC/DRK
rubbing u ~~> ~procrasti: getaway to HE'LL
Hey! at least he was in a stable relationship. - procrasti
enter K5 via Blastar.in

You know that doesn't end well, don't you? (none / 1) (#15)
by Del Griffith on Tue Dec 18, 2007 at 07:30:56 PM EST

>fuck holly
She wrestles you to the ground, and overpowers you, which is freaking embarrassing.  What's worse, is that she's wearing a strap-on, and has her way with you.


    * You were raped by a chick.  You may as well klerck right now. *

In that game you scored 0 out of a possible 0, in 2 turns.

Would you like to RESTART, RESTORE a saved game or QUIT?
>

-------
I...I like me. My wife likes me. My customers like me. Because I'm the real article. What you see is what you get. - Me


[ Parent ]

i dunno the end (none / 0) (#16)
by sye on Tue Dec 18, 2007 at 07:43:13 PM EST

it wasn't written in Chinese

~~~~~~~~~~~~~~~~~~~~~~~
commentary - For a better sye@K5
~~~~~~~~~~~~~~~~~~~~~~~
ripple me ~~> ~allthingsgo: gateway to Garden of Perfect Brightess in CNY/BTC/LTC/DRK
rubbing u ~~> ~procrasti: getaway to HE'LL
Hey! at least he was in a stable relationship. - procrasti
enter K5 via Blastar.in
[ Parent ]

I think there is unicode(tm) support (none / 0) (#17)
by Del Griffith on Tue Dec 18, 2007 at 07:58:09 PM EST

but that sounds like work.

I wonder if it'd go top down, or does the CJVK stuff go right/left? left/right?

The only 'chinese' stuff I know is the food stuff common from Japanese.. and that's not a whole heck of a lot to me, as I never studied it properly...

-------
I...I like me. My wife likes me. My customers like me. Because I'm the real article. What you see is what you get. - Me


[ Parent ]

Left->right is just fine. [nt] (none / 0) (#35)
by BJH on Thu Dec 27, 2007 at 09:44:20 AM EST


--
Roses are red, violets are blue.
I'm schizophrenic, and so am I.
-- Oscar Levant

[ Parent ]
I can trans. it if only you will be nice to me (none / 0) (#19)
by nostalgiphile on Wed Dec 19, 2007 at 05:18:37 AM EST

for once!

"Depending on your perspective you are an optimist or a pessimist[,] and a hopeless one too." --trhurler
[ Parent ]
Best interpreter (aka "player") (3.00 / 3) (#22)
by rpresser on Wed Dec 19, 2007 at 03:43:31 PM EST

would be Gargoyle, available for Win/Mac/Linux, massively better typography.
------------
"In terms of both hyperbolic overreaching and eventual wrongness, the Permanent [Republican] Majority has set a new, and truly difficult to beat, standard." --rusty
interpreter or extensions? (none / 0) (#25)
by sye on Thu Dec 20, 2007 at 02:14:31 AM EST

Natural Inform default extensions listed are Emily Short ( 'Punctuation Removal' is my cup of tea...) & Graham Nelson so how's Gargoyle fit in ?

~~~~~~~~~~~~~~~~~~~~~~~
commentary - For a better sye@K5
~~~~~~~~~~~~~~~~~~~~~~~
ripple me ~~> ~allthingsgo: gateway to Garden of Perfect Brightess in CNY/BTC/LTC/DRK
rubbing u ~~> ~procrasti: getaway to HE'LL
Hey! at least he was in a stable relationship. - procrasti
enter K5 via Blastar.in
[ Parent ]

"extensions" are compile-time libraries. (3.00 / 3) (#29)
by rpresser on Thu Dec 20, 2007 at 09:40:51 AM EST

Gargoyle is a runtime interpreter.

Short lesson:

Inform compiles to one of two virtual machine architectures: the Z-Machine (older, originally reverse-engineered from Infocom games, comes in several varying sized flavors) and Glulx (32-bit redesign).  On top of this is the presentation layer "glk", analogous to the X Window protocol.

There are a wide variety of virtual machine runners, mostly deriving from the original "frotz". Most of the more recent ones incorporate glk.  Gargoyle is a shell around frotzglk with specific glk styles set as the default.  It also supports totally different game architectures like TADS, HUGO, Adrift...
------------
"In terms of both hyperbolic overreaching and eventual wrongness, the Permanent [Republican] Majority has set a new, and truly difficult to beat, standard." --rusty
[ Parent ]

I'm happy to see this made it. (none / 1) (#30)
by Brogdel on Thu Dec 20, 2007 at 12:13:16 PM EST

Used to play a text game, back in the day, called Bedlam. Old Radio Shack computer with the modem that you had to lay the phone receiver on.

What about Math? (none / 0) (#32)
by k31 on Fri Dec 21, 2007 at 05:35:09 PM EST

I didn't fully Read the full manual for Inform 7, but whilst I found it easy to create rooms, items, and story lines, it was rather hard to manipulate numerical variables.

Someday I'll RTFM and try again, but it would be interesting to see someone with more patience/interest tackle adding a hitpoint-based combat system or, more realistically, a currency system and shop or three, to the world, and see if they find it as weird as I do.


Your dollar is you only Word, the wrath of it your only fear. He who has an EAR to hear....

something has a value (none / 0) (#33)
by Del Griffith on Sun Dec 23, 2007 at 05:42:07 PM EST

of which it is bla...

It's in there, it's just very weird to work.

I'm still trying to work out a turnstyle in that you can pass one way without needing a card, but the other way you need to use a card... I think I've almost gotten it though.

The annoying thing seems to be you can quickly get something generic working.. But specialized things take time.

-------
I...I like me. My wife likes me. My customers like me. Because I'm the real article. What you see is what you get. - Me


[ Parent ]

My impressions almost exactly (none / 0) (#34)
by k31 on Sun Dec 23, 2007 at 09:04:57 PM EST

In C, the "int" data type is "first amongst equals". Even the concept of a boolean variable isn't introduced as a primitive datatype until C++ (or C99, I'm not sure, I have an old ANSI C book), so when you try to work with words in C, you need to look at an array-of-chars, where "char" is a variation of "int". This leads to all sorts of text-handling problems that perl, python, php, C++, and so on are designed differently to avoid.

In Inform 7, it seems that the story is "fist amongst equals". If you want to take a "choose your own adventure" novel, and make it into an Interactive Fiction thingy, it should be painless... same thing for recreating Zork or actual IF.

However, try an do any "magic", i.e. math, and it's another thing altogether.

I do like its implicit support for finite states (don't recall the syntax offhand but I'll post an example if you want), but I found working with numbers to cause all sorts of demons to be involked in the form of verbose, but largely unhelpful, errors. They look pretty and are in prefect English but didn't help at all in englighting me. However, I hadn't totally read thru the manual (which is also very well integrated with the Developer Tools/Environment), so I don't want to say that it is difficult, once you know it, since I'm still quite ignorant and didn't give it much time.

So Inform 7 is easy to learn, but very (or, perhaps, somewhat) difficult to become comptent at if you want to do anything involving numerical models. If/when I find out how, I'll do a tutorial on it, 'cause I'm sure I'll forget again and the manual doesn't bring it to the forefront.


Your dollar is you only Word, the wrath of it your only fear. He who has an EAR to hear....
[ Parent ]

Fun with Inform 7 | 36 comments (23 topical, 13 editorial, 0 hidden)
Display: Sort:

kuro5hin.org

[XML]
All trademarks and copyrights on this page are owned by their respective companies. The Rest İ 2000 - Present Kuro5hin.org Inc.
See our legalese page for copyright policies. Please also read our Privacy Policy.
Kuro5hin.org is powered by Free Software, including Apache, Perl, and Linux, The Scoop Engine that runs this site is freely available, under the terms of the GPL.
Need some help? Email help@kuro5hin.org.
My heart's the long stairs.

Powered by Scoop create account | help/FAQ | mission | links | search | IRC | YOU choose the stories!