PunyJam #2

The Jam

The PunyJam #2 is a game jam running from 29 October to 21 November 2021, where entrants make small “interactive fiction” games using the Inform 6 compiler and the PunyInform library. The rules are listed on the jam’s page, and the theme will be announced on 29 October at the start of the competition.

This page attempts to help folks get started with PunyInform in time to start the competition.

Build Tools

Perhaps bonghits will fix my Makefile.

I’ve created a Makefile that will grab and buildEverything this Makefile builds is installed as your user in-tree, without need for root access.

all of the dependenciesWe use David Griffith’s Inform6 toolchain tree to build the compiler and ensure we have a compatible version of the PunyInform library installed.

We install zvm as the z-machine so Andrew Plotkin’s regtest.py script can run the test harness. zvm is a JavaScript stdio implementation of the Z-machine version 5, and it is the only one I have found that installs cleanly and easily without creating I/O problems on any platforms.

to compile and test your game. The goal is that you can just type make and your game will be re-built and tests run.

There is an example repo you can start from, which includes the minimal.inf template from the core PunyInform distribution as well as a small minimal.test file that exercises a few features of the test harness and the example game. Here is how you use it:

$ git clone https://zork.net/punyjam-minimal
$ cd punyjam-minimal
$ ls
Makefile  minimal.inf  minimal.test
$ make

This should install and build all the tools you need, and compile the minimal.z5 game.Which you can play, if you like: there isn’t much to it. Maybe install frotz or something to play it?

The resulting minimal.out file should contain only the names of the test suites preceded with asterisks.

Dependencies

Inform was written on an Acorn Archimedes computer with no network access and a 20MB hard disc, smaller than the current Mac OS X download size. Most of Inform’s users had Commodore Amigas, or ran OS/2 on IBM PCs; the Apple IIe Platinum was still being manufactured, but was too small. Linus Torvalds had a two-year head start on me, which is no doubt why his software has become more famous than mine, but even so, the word “Linux” was still hardly known.

For this Makefile to work for you, you will need the following:These dependencies have been chosen to work well on both “luxury” systems such as Ubuntu installs, as well as limited systems such as Alpine Linux or the Termux shell under Android.

  1. A suitable C compiler and libc,The inform6 compiler is very portable, as the epigraph above illustrates.

    and doesn’t require any outside libraries.
  2. npm from nodejs to install a dependency of regtest.py.
  3. Python 3 to run regtest.py.

The Documentation

In trying to be both a tutorial and reference work, this book aims itself in style halfway between the two extremes of manual, Tedium and Gnawfinger’s Elements of Batch Processing in COBOL-66, third edition, and Mr Blobby’s Blobby Book of Computer Fun. (This makes some sections both leaden and patronising.)

The documentation has some archaeological layers to it, so you may need to spend some time assembling your tutorials and references. There is a Learning PunyInform section of the README, but it assumes a lot of prior experience. So let’s go over what resources are available:

Vintage Is The New Old

Fredrik Ramsberg wrote an introductory article to PunyInform coding that is part of a series introducing the topic to new authors.I’ve linked you into the middle, but the whole series is a good read!

The DM4

The DM4 cover
The DM4, or version 4 of the Inform Designer’s Manual

The primary documentation for the past quarter-century has been The Inform Designer’s Manual.Yes, I ordered a printed copy of this the moment inform6 was released under the Artistic Licence.

This is an entertainingly-written book full of extremely colourful examples, but it suffers from attempting to be both a tutorial and reference in one document. The “ruins” example is woven throughout the text, but there is a lot of front-loading of detail that you’d expect more from a specification than a howto.

This is worth having downloaded somewhere, especially when curious about the core language; but as it primarily concerns itself with the upstream I6 library (instead of PunyInform), it’s best to start elsewhere.

The IBG

The IBG cover
The IBG, or Inform Beginner’s Guide

The Inform Beginner’s Guide was an attempt to write a good tutorial for beginning inform6 authors, and it did a fairly good job. It’s worth reading through at least the introductory chapter to get a sense for the language and object model, and refer back to it as you work occasionally.

It also uses the upstream I6 library, but for the most part is so straightforward that the differences are minimal.Still, beware: the examples as written won’t compile for us!

The PunyInform Manual

The PunyInform Manual is little more than a GitHubAbolish ICE

wiki page outlining the differences between the upstream I6 library and its replacement behaviours in PunyInform. While this is handy to find some examples of best practice, it doesn’t help the new author too much. Keep this handy, though!

Cheat Sheets

Inform in four minutes

  1. Inform in four minutes is a cheat-sheet for the core Inform6 language. This covers only the behaviour of the compiler itself, and not the standard library,PunyInform contributor Fredrik Ramsberg pointed out to me that it covers the library functions UnsignedCompare and IndirectlyContains, but that both work the same in PunyInform.

    so everything in this sheet aside from the “File Structure” section is applicable to your game.
  2. The PunyInform QuickRef is a similar cheat-sheet for the PunyInform library.

Examples

Hibernated 1
Hibernated 1 Director’s Cut, running on a Commodore 64

There are a lot of games out there now written in PunyInform, and it can be instructive to read them and find out how certain things were accomplished. Here are a few:

  1. Craverly Heights was a small game ported to Puny in about 1800 lines of code.
  2. Djinn On The Rocks does some advanced tricks by swapping which Object represents the player throughout the game.
  3. Calypso is laid out in multiple files, and has ifdefs to switch whether to use PunyInform or not.
  4. Hibernated 1 is shipped in source form with the “Puddle” build tool system.Puddle requires a lot of setup, but when you have it working it can churn out disk images for dozens of retrocomputer platforms!

  5. The Job is a good example of the size of game for a PunyJam,It is the PunyInform release manager’s submission to PunyJam #1!

    and the inform6 source is included in the zipfile.

There is also a howto section in the PunyInform source tree, which gives examples for popular tasks that must be handled in a different way from the traditional Inform 6 library.

A Talk

It looks like someone gave a talk on PunyInform this month, and slides are available.Although it’s unclear if there’s a recording of the presentation anywhere yet!

Debugging

For the most part, your test inputs should be good enough for a game of this size, but Roger Firth has a pretty good collection of Inform6 debugging resources.

C64??

PunyInform is a library for the Inform 6 programming language, to make it easy to create simple or advanced text adventures which will work well on 8-bit computers like the Commodore 64, Amstrad CPC, Apple II, Spectrum +3 etc.

Ah yes, one of the goals of PunyInform is to make games that fit on the original 8-bit platforms of the 1980s that Infocom used to support. To that end, you can find a great many image builders in the “Puddle” repo linked in the Examples section, but one that has been developed together with PunyInform is Ozmoo.

Ozmoo builds for select 6502-based computers, most significantly the C64 and the BBC Micro. You can build it yourself, but there is also Ozmoo Online which lets you upload your zfile and get back a Commodore disk image.

Interchat

  1. There is a Discord server for PunyInform where discussions of the Jam will take place.
  2. I’ve set up a Signal chat to help people learn PunyInform in time for the start of the competition.
  3. The Interactive Fiction Discourse server has a section for discussing inform6, including PunyInform.