Wijs!
Ik heb indertijd nog dingen gemaakt met Inform 6. En, euh, meer dan twintig jaar geleden dingen gemaakt met The Quill.
Met “dingen” bedoel ik dan wat men nu Interactive Fiction noemt, en indertijd Adventure Games. Of, nadat er ook point & click-dingen waren zoals de King’s/Police/Space Quests: Text Adventures.
Werelden bouwen is wijs, zelfs al zit er niemand anders in. En met Inform 7 wordt het wel heel erg eenvoudig. Natural language programming! Hoera! Kijk, dit is de broncode:
“House”
by Michel Vuijlsteke
Section 1 – Setting things up
The player is wearing a bathrobe and some slippers.
The description of the bathrobe is “It’s a dark blue striped bathrobe with deep pockets.” The description of the slippers is “They’re pretty threadbare slippers.”
The bathrobe is the player’s holdall.
Section 2 – Ground floor
The Hallway is a room. “You are in a dark and narrow hallway. Heavy oak beams loom overhead. A rickety door, all wood and metal and jingly glass bits, leads outside.
[if the curtains are not in the room]A doorway leads east [otherwise]Gray curtains hang down from the ceiling on the east wall[end if] and a large brown wardrobe looms against the west wall.”The front door, some beams, some curtains and a wardrobe are scenery in the hallway.
The wardrobe is closed and openable. It contains a dark green overcoat. The overcoat is wearable. The description of the overcoat is “The coat is a dark green ankle-length affair, shiny in patches and with its lining hanging out.”
The front door is south of the hallway and north of the street. The front door is a lockable and unlocked door. “[if open]The front door is open, gently swaying in the wind. [otherwise]The front door is shut.”
A door-mat and a white desk are in the hallway.
A small brass key unlocks the front door.
The white desk is pushable between rooms.Instead of taking the desk, say “You can barely lift the desk, let alone carry it. You may be able to push it around though.”
Instead of taking the door-mat, say “Ugh! It’s all muddy!”
Instead of taking the front door, say “The door may be rickety, but it’s still surprisingly well attached to the door jamb.”
Instead of taking the beams, say “You can’t quite reach the beams.”
Instead of taking the curtains:
say “You tug on the curtains. They practically fall apart in your hands, revealing a dark room behind them.”,
remove the curtains from play.The Street is a room. “You are standing in the middle of an empty, weirdly modern street running through muddy fields. Sand crunches underfoot.
The only house in the street that doesn’t have its doors and windows boarded is a drooping affair to the north.”Some sand is scenery in the street.
Instead of taking the sand, say “You consider pocketing a handful of damp sand but think better of it.”The house is scenery in the street.
The description of the house is “The house looks like a mediaeval affair hidden behind peeling nineteenth century plasterwork. It has quite obviously seen better times.
There’s a rickety door and a window with half-drawn blinds on the ground floor.”The window is scenery in the street. “The window is gray with caked on dust.”
The street is outside of the hallway.
En dat geeft dan bijvoorbeeld dit:
House
An Interactive Fiction by Michel Vuijlsteke
Release 1 / Serial number 060503 / Inform 7 build 3K27 (I6/v6.31 lib 6/10N) SDHallway
You are in a dark and narrow hallway. Heavy oak beams loom overhead. A rickety door, all wood and metal and jingly glass bits, leads outside.Gray curtains hang down from the ceiling on the east wall and a large brown wardrobe looms against the west wall.
You can see a door-mat and a white desk here.
>look at myself
As good-looking as ever.>inventory
You are carrying:
a bathrobe (being worn and open but empty)
some slippers (being worn)>examine bathrobe
It’s a dark blue striped bathrobe with deep pockets.>put slippers in bathrobe
(first taking them off)
You put the slippers into the bathrobe.>look in wardrobe
You can’t see inside, since the wardrobe is closed.>open it
You open the wardrobe, revealing a dark green overcoat.>wear overcoat
(first taking the dark green overcoat)
You put on the dark green overcoat.>open door
You open the front door.>examine door
The front door is open, gently swaying in the wind.>go out
Street
You are standing in the middle of an empty, weirdly modern street running through muddy fields. Sand crunches underfoot.The only house in the street that doesn’t have its doors and windows boarded is a drooping affair to the north.
>get sand
You consider pocketing a handful of damp sand but think better of it.>look at the window
The window is gray with caked on dust.>n
Hallway
You can see a door-mat and a white desk here.>get door-mat
Ugh! It’s all muddy!>get desk
You can barely lift the desk, let alone carry it. You may be able to push it around though.>look
Hallway
You are in a dark and narrow hallway. Heavy oak beams loom overhead. A rickety door, all wood and metal and jingly glass bits, leads outside.Gray curtains hang down from the ceiling on the east wall and a large brown wardrobe looms against the west wall.
You can see a door-mat and a white desk here.
>get curtains
You tug on the curtains. They practically fall apart in your hands, revealing a dark room behind them.>get beams
You can’t quite reach the beams.>get desk
You can barely lift the desk, let alone carry it. You may be able to push it around though.
Een uurtje werk, twee kamers en het begin van een puzzel (het bureau verplaatsen tot onder de balk, wie weet zit daar wel iets in!), en ik heb er serieus goesting in om er aan verder te doen.
Ach, wereldliteratuur it ain’t, en ik ben hoedanook niet van plan om dergelijke dingen op de wereld los te laten, maar het is ongelooflijk wijs om te prutsen, en Inform 7 is echt machtig.
Reacties
2 reacties op “Interactief”
Cool! Anderen zouden wel eens dit pad kunnen betreden… 😉
Interessant spul.. ooit eens beter bezien..