IOCCC image by Matt Zucker

The International Obfuscated C Code Contest

2004/arachnid - Best use of vision

Author:

To build:

    make

There is an alternate version for rogue players, vi(m) users and Dvorak typist (i.e. those who need hljk for moving left, right, down and up). See Alternate code below.

To use:

    ./arachnid [mazefile]

Try:

    ./arachnid arachnid.txt

and then try:

    ./arachnid arachnid.c

Navigation is through the use of the wasd inverted-T formation on QWERTY keyboards. Rogue players, vi users, and Dvorak typists are invited to get lost (or use the alt version)!

Alternate code:

If you don’t like the wasd movement keys you can try the vi(m) movement keys instead.

Alternate build:

    make alt

Alternate use:

Use arachnid.alt as you would arachnid above.

Judges’ remarks:

The fun part comes when you realize that the maze scrolls. The overall visual effect is quite pleasing (at least on some displays), and, well, it’s a lot of fun.

Author’s remarks:

This program accepts ASCII formatted mazes as input, and renders them on screen for the user to explore, complete with Line Of Sight - you cannot see parts of the maze your avatar (the @) could not have seen.

The maze files will be interpreted with spaces ' ' as gaps, tilde ~ symbols (if any) as exits (which get represented as a NetHack style < once loaded), and any other characters as walls.

Feed the program its own source for a default maze. Running it with no command line parameters will do this. In a nice symmetry, the character constant ~ that recognises exits to input mazes itself forms the exit to the default maze. Another maze, arachnid.txt has also been provided. This maze is 255x255, about the largest maze supported, for the particularly insane maze explorers out there.

Usage

    ./arachnid [mazefile]

You can explore the maze using the w,a,s, and d keys.

Inventory for 2004/arachnid

Primary files

Secondary files


Jump to: top