ZILF 0.6 released

I’ve released a new version of ZILF, the ZIL compiler + Z-machine assembler + parser and game library, which you can download from Bitbucket.

There are way too many changes to list here, including:

  • Doors!
  • Loops!
  • Scope!
  • Time!
  • Order!
  • Vectors!
  • Splices!
  • Sections!
  • Flags!
  • Prepositions!
  • Quirks!
  • Retro goodness!

Thanks go out to Roody_Yogurt for contributing to the library.


If you’ve never tried ZIL before, here’s a taste of what you’re in for. This snippet from a work in progress demonstrates the use of doors:

[spoiler][code]<ROOM IN-IMMENSE-N/S-PASSAGE
(DESC “Immense N/S Passage”)
(IN ROOMS)
(LDESC “You are at one end of an immense north/south passage.”)
(SOUTH TO IN-GIANT-ROOM)
(NORTH TO IN-CAVERN-WITH-WATERFALL IF RUSTY-DOOR IS OPEN)
(ACTION IN-IMMENSE-N/S-PASSAGE-F)>

<ROUTINE IN-IMMENSE-N/S-PASSAGE-F (RARG)
<COND (<AND <=? .RARG ,M-BEG> <VERB? WALK> <PRSO? ,P?NORTH>>
<COND (<FSET? ,RUSTY-DOOR ,LOCKEDBIT>
<PERFORM ,V?OPEN ,RUSTY-DOOR>
)
(<NOT <FSET? ,RUSTY-DOOR ,OPENBIT>>
<FSET ,RUSTY-DOOR ,OPENBIT>
<TELL “[first wrenching the door open]” CR>
)>)>>

<OBJECT RUSTY-DOOR
(DESC “rusty door”)
(IN IN-IMMENSE-N/S-PASSAGE)
(SYNONYM DOOR HINGE HINGES)
(ADJECTIVE MASSIVE RUSTY IRON)
(TEXT “It’s just a big iron door.”)
(DESCFCN RUSTY-DOOR-DESCFCN)
(ACTION RUSTY-DOOR-F)
(FLAGS DOORBIT LOCKEDBIT)>

<ROUTINE RUSTY-DOOR-DESCFCN (ARG)
<COND (<=? .ARG ,M-OBJDESC?> )>
<TELL “The way north "
<COND (<FSET? ,RUSTY-DOOR ,OPENBIT> “leads through”)
(ELSE “is barred by”)>
" a massive, rusty, iron door.”>>

<CONSTANT HINGES-ARE-RUSTED
“The hinges are quite thoroughly rusted now and won’t budge.”>

<ROUTINE RUSTY-DOOR-F ()
<COND (<VERB? OPEN>
<COND (<FSET? ,PRSO ,LOCKEDBIT>
<TELL ,HINGES-ARE-RUSTED CR>)
(<NOT <FSET? ,PRSO ,OPENBIT>>
<FSET ,PRSO ,OPENBIT>
<TELL “The door heaves open with a shower of rust.” CR>)>)
(<VERB? CLOSE>
<COND (<FSET? ,PRSO ,OPENBIT>
<TELL “With all the effort it took to get the door open,
I wouldn’t suggest closing it again.” CR>)
(ELSE <TELL “No problem there – it already is.” CR>)>)
(<VERB? OIL>
<COND (<AND <HELD? ,BOTTLE> <IN? ,OIL-IN-BOTTLE ,BOTTLE>>
<REMOVE ,OIL-IN-BOTTLE>
<FCLEAR ,PRSO ,LOCKEDBIT>
<FSET ,PRSO ,OPENABLEBIT>
<TELL “The oil has freed up the hinges so that the door will move,
although it requires some effort.” CR>)
(ELSE <TELL “You have nothing to oil it with.” CR>)>)
(<VERB? WATER>
<COND (<AND <HELD? ,BOTTLE> <IN? ,WATER-IN-BOTTLE ,BOTTLE>>
<REMOVE ,WATER-IN-BOTTLE>
<FSET ,PRSO ,LOCKEDBIT>
<FCLEAR ,PRSO ,OPENABLEBIT>
<TELL ,HINGES-ARE-RUSTED CR>)
(ELSE <TELL “You have nothing to water it with.” CR>)>)>>[/code][/spoiler]

It might look scary, but I’ve found that it does click after a while. Plus, it’s fun looking things up in the Infocom ZIL book: xlisp.org/zil.pdf

I’d like to write a game for next year’s @party!

The fascinating thing is that I’m re-reading Maher’s history of IF and computing, and there’s a post where he talks about Infocom… well, ok, plenty of posts where he talks about Infocom, but in this one he shows Zork in FORTRAN and then in ZIL.

It’s so cool to read the snippet provided above having seen the original ZIL as explained by Maher. It’s like a window into history.

Roody_, is there a single author credited to that VERY cool Infocom ZIL guide?

Somehow missed this (and only caught it now because I’m looking at old ZIL threads). The ZIL manual says it was written by “SEM” which is Meretzky.

The ZIL manual is a wonderful piece of literature and I’d recommend it to anyone whether or not they’re considering using ZIL. It was hugely helpful in writing and improving my own engine, too.