ZILF

Has Jesse McGrew (btw, kudos if that is your surname, Jess, McGrew? And you designed a near perfect carbon copy of Infocom’s ZIL compiler? Nostalgically awesome dude!) been working on ZILF lately? I love how simple it is to use. As long as you don’t do anything too complicated or expect anything more advanced (might as well go to Inform 6 if not 7 for that) it is basically a replacement for ALAN 2 or 3 for me (but makes native zcode with ZAPF assembler with some needed function processes like MAIN and the like, but not that big of a deal, but plus since it has more the novelty feel of it being close to ZIL as possible!) and because I am not really trying to make a very intensive if not advanced type of IF, i would use ZILF for my programming of IF for the moment.

He posted the other week that’s he’s been getting version 0.8 ready for release. You can watch some of the progress yourself over at its bitbucket repository: https://bitbucket.org/jmcgrew/zilf/overview

Thanks Roody! He is a busy guy! I just love how he was able to create if not replicate this absolutely novel and fascinating piece of electric literacy history!

I’m glad you like it! :slight_smile:

ZILF 0.8 is right around the corner, with lots of fixes and improvements. I’m hoping to release it in the next week or so.

Like we say it in New England… Steak sauce! :slight_smile: Great work Jess! You the man!

BTW, Jess, is there a way I can customize the status line for the Turns and Score labels? I just want to use the Score on it’s own, but also give out a cap to inform the max score of the game. Or do I have to use assembly opcodes to do this?

See possibility of customizing the status line in ZILF 0.7?.

Excellent dude! Thanks Jess! I didn’t realize you answered my post. Thanks man! Going to port to ZILF for the remainder. It’s not like a complete write up no doubt, were it is compatible to ZIL (and most like THEN SOME) so I need to do regardless is update the ZILF package and libraries for Mono (I use Linux btw :stuck_out_tongue: ) Thanks again man!

hate to be a bother again man, I even checked the ZIL on how to do this… But how do I go about making a condition within the Room when going north would use a sorry statement rather then gaining entry? For instance, I have a gate before me, and I have to unlock it from a hidden key, but I cannot go north unless I unlock the iron gates. Is it possible to use directions of NORTH as a routine as well for the action? if so then I been going about it the hard way all along. I also, due to using ALAN 2 alot, made a room called nowhere and use it to put all unused objects and actors in it. I figured it would better if not ideal. Plus I think that was the same arrangement Scottfree did due to Scott Adam’s coding of his games.

You can do that with a PER exit and a routine. For example: bitbucket.org/jmcgrew/zilf/src/ … t.zil-1103

Actually, there’s a more convenient way to do it for locked doors: (NORTH TO SOME-ROOM IF IRON-GATE IS OPEN). You can customize the message, too. See the grate and the crystal bridge in advent.zil.

you are awesome dude!

oh yeah, I just realized you also launched an IDE for ZILF if not ZIL, Yomin… Dude, you are like my hero :stuck_out_tongue: If only ZILF existed in my 20’s I would have given up on other IF languages and use this! But if it wasn’t for my experience with ALAN 2, I wouldn’t have idea how to program in list programming!

Just a thought… has a straight C port of ZILF been considered?

Not by me. I think the project has benefited substantially from being written in C#, and the benefits of porting it to C would be minimal; it already runs everywhere you can install Mono.

If someone else wants to give it a try…

The easiest way would be to start by extending Confusion, Matthew Russotto’s MDL interpreter written in C. Roughly half the code in ZILF is there to parse and execute a subset of MDL. Confusion implements a different subset, but it’s most of the way there.

At that point, you’d want to decide whether to implement the ZIL compilation part in C or MDL. C would surely execute faster, but MDL might be easier to work in – you’re going to be manipulating a lot of MDL structures anyway. Writing it in MDL would also, amusingly, let you run your compiler on the real mainframe MDL (twenex.org) or even on top of ZILF.

Alternatively…

You could do a direct port. Translating 60,000+ lines of C# to C is a big task, but doable. Besides having to flatten all the OOP, the code also makes use of various C#-isms that you’d need to rework: for example, ZILF’s systems for parsing parameter lists have made it incredibly easy to add functions to the compiler and interpreter, but they’re built on reflection, so you’d either need to redesign them in a way that makes sense for C or write custom parsing/type-checking code for about 400 functions.

Hey Jess, good job on updating the ZILF logs! Cannot wait to download the new ZILF zero-point release! Looking forward to the future of it being at version 1! It’s all good even if I have to use Mono. Even with WINE without Mono, most likely to dedicated kernel releases of my Lubuntu Xenial updates, I can play it outta the box just as well! Your bringing ZIL with your software suite has made an old skool IF-er’s dreams come true! Thanks again dude!

Hey Jesse, how do I go about the SOUND or DISPLAY routine call and block creation? Like how do I link the routine from the object like a room or others, and what tag do I use to define the soundfile and a variable for it’s name, is it the GLOBAL variable tag? Ie, sound is dedicated OGG and PNG for OSS and compact rom storage efficiency “sound001.ogg” and “pic001.png” are the file names and archs.

I’m afraid you’re mostly on your own if you want to try this. The library hasn’t been updated for V6 yet, only the compiler and assembler.

First, you’ll need to consult the Z-Machine Standard on correct use of the opcodes: inform-fiction.org/zmachine/stan … index.html. (But watch out, they have different names in ZIL!)

Second, your source code will only refer to sounds and graphics by number. ZILF might do more to help here in the future, but for now you’ll need a separate Blorb packaging tool to turn your media files into something the interpreter can use, such as cBlorb, which is included with Inform 7: inform7.com/sources/src/cBlorb/Woven/index.html.

thanks man! also saw you released the new ZILF zero-point! Great job, you never disappoint!

FWIW, if you’re developing on some sort of Unix, I’ve updated the Perl-based Blorb tools. They’re at github.com/DavidGriffith/blorbtools.