Blorb on DOS/Windows

The Blorbifier for DOS/Windows is a package called "iblorb", and is available on Ross Raszewski's IF page (scroll to the very bottom.) Once you've downloaded the iblorb archive, extract the files within to the directory where your source code and compiler are.

You will need to create a resource file for Blorb. This should bear the same name as your source code file, only with the extension .res instead of .inf (ie, if your source code is called "chef.inf", call the Blorb resource file "chef.res". Create it in whatever program you use to write your source code: a text editor of some sort, not a word processor.)

The resource file is simply a list of the files to be included. This list must be in a particular format, with each line bearing the type of file to be included, the name by which you'll be calling the file inside your source code, and then the location of the file. The first file you'll want to include is your game file, followed by any images or sound files you want. A very simple game might have a Blorb resource file that looked like this:


   CODE C:\IF\Glulx\chef.ulx



   PICTURE Monkey C:\Graphics\macaque2.jpg

   PICTURE Stapler C:\Graphics\Drawings\stapler.png

Once your resource file is done, you'll need to include a mention of it in your source code. Putting the "Include" command for the Blorb resource file right after including Infglk works nicely. However, what you'll actually be including is not the resource file you've written, but a modified version generated by iblorb. This file will have the extension .bli, so the actual Include instruction in your code should look like this:


   Include "chef.bli"; 

One last step before you begin: since compiling and Blorbifying take place at the same time if you use this method, iblorb needs to know what your compiler is called. To tell it, you need to create a file called infb.rc, in much the same way you created the .res file. It should go in the same directory as iblorb, and contain one line. The line is the word "INFORM" followed by the name (minus extension) of the compiler you're using, plus any switches you want. Your compiler might be called informbp.exe, for instance, and you need to use the command-line switch -G to compile to Glulx instead of to the Z-machine. So your infb.rc file would read, in its entirety:


   INFORM informbp -G 

Finally, pop open a DOS window, and get to the directory where your source code, your compiler, your Blorb resource file, your infb.rc file, and the iblorb files are. The command you'll be typing takes the following format: the word "front", a space, the name of the resource file (minus the .res extension), another space, the name of your source code file (including the .inf extension), yet another space, and the name of the compiled game file you'll be including in the Blorb file (this will have an .ulx extension, which you should include). Sound complicated? All it means is that you should type in this:


   front chef chef.inf chef.ulx 

...replacing "chef" with whatever the common name of your files might be.

Now, it might be the case that you'll have errors in your program, and you'll be notified of these just like you would be had you compiled with an old-fashioned "informbp -G chef". But if your program is free of compile-time errors, what you will end up with is a file with a .blb extension (chef.blb, in this example) which you can run with your Glulx interpreter. Simply load in chef.blb instead of chef.ulx, and enjoy the fruits of your labor.


Return to Blorb
Or return to the table of contents