I've been looking into Inform 7 to write a text adventure and came across a few samples. The most amusing was here, and it takes place in just one room!
In case you feel like wasting a bit of time.
Warning: it kind of sucks if you get stuck on 19 points out of 20, since you have to go examine everything again. But it reminds me of my old efforts at IF where I only used basic verbs and even once created duplicate rooms where you got 10 points for taking ammunition from each one.
I miss not knowing how bad a programmer I was.



sashanan Sep 21, 2010
I wrote my share of shoddy text adventures where each location had its own code for interpreting commands from the user until I finally got good enough to write a centralized command interpreter.
aschultz Blogger Sep 21, 2010
10 PRINT ROOM$[ROOM]
20 PRINT DESCRIPTION$[ROOM]
30 INPUT "> "
40 X=21: FOR I = 0 TO 20: IF CMD$[I] = VERB$[I] THEN X=I
50 NEXT
60 ON X GOTO 100,150,200,250,300,350
...
100 IF DIR[ROOM,0] > -1 THEN ROOM=DIR[ROOM,0]: GOTO 10
...
50000 REM ROOMS HERE N S E W U D
50010 REM E/W ONLY
50020 DATA -1,-1,1,2,-1,-1
...
55030 REM DESCRIPTIONS
55040 DATA Central room,This is where the game starts.
...
It was a lot of fun when the light went on. And before then. Well, until my game got too big and ran out of memory just as I was getting to the good part. Hooray for 64k!
zippdementia Sep 21, 2010
sashanan Sep 21, 2010
I hit its limit ("Module level code too large") at some point too on a ver text-heavy adventure involving jungle-dwelling cat people (don't ask, I came up with weird stuff in those days) which I resolved by having the game in multiple files, and having one load and run the next when it hit its size limit.
aschultz Blogger Sep 21, 2010
Sashanan--Now you mention it, I probably used 0 too. And I misremembered. I didn't know about indices starting at zero, yet. Also, I may've used -1 for a place you couldn't get. I probably used 200 or something for inventory. I didn't quite have that many rooms.
Your stuff sounds more original than mine. Also, big credit for splitting the game across disks. I think I planned to have that but there would be no going back.
I seem to remember almost getting into new files--maybe that was my text role playing games, though. Where I saved character data and maps. I never did have a save file for text adventures. It was a sort of holy grail. I rather badly DID want my games to light up the disk drive lights, just like the Infocom games did.