Ulf, A Day @ The Zoo
.

:: The hacker

There's an idea that holds some romance for me.

It's about a hacker. There are hackers that work in packs. But not here. For
the scene I am painting, it is an individual.

In some tellings, it would be late at night. A labcoat before a wall of
monitors. The lab is dark, but the figure is bathed in screenlight. But the
scene could as easily be sunrise by a rice field in rural Indochina. Jeans and
tshirt, hammering at an ancient Thinkpad with a pile of notes at one side,
a mug holding the papers down from the wind.

What's important is not the place, but the sense of isolation. The hacker is
like an astronaught or dinghy at sail and far from land. With sparse but deft
tools, and the power of thought, they interact with a vast world.


:: Ulf's "A DAY @ THE ZOO"

There was a stand-out entry in this year's 7-day roguelike festival. Few
crowds would be more tolerant of quirkiness or aware of subtlety than
roguelike developers. Yet I think many would still have overlooked this game.
It's Ulf's 'Zoo'. http://happyponyland.net/zoo.php

The premise is simple. You are at the entry to a zoo. You wonder around
looking at the space... and that's it. Eventually you get bored and head for
the exit.

It's a study in a single idea - the idea of field of view. As you move around,
animals appear and disappear based on walls and trees. Very occasionally, the
animals move.

For what must be a first, I've spent more time and had more fun looking at the
code than playing the game it defines. When I opened it, I was surprised at
how sparse it was. He uses no libraries, and generates the FOV entirely from
an algorithm that's plain to see in the code. Everything interesting is
well-commented.

After spending some time with the game and the code, I notice subtleties, such
as the elegant way that the field is only redrawn as the player gets near to
an edge of the field of vision. The procedural generation of the zoo is also
sophisticated.


:: Code

I'm in awe of this style of hacking. Ulf started with a standard tool box:
unix, a text editor and the C compiler. With just this, he has constructed the
thing to demonstrate the ideas he held.

There are mechanisms that would not work in larger games with which he'd be
familiar. But rather than import then here - using a chainsaw to break a twig,
he has just gone for simple solutions.

The result is beautiful, but the act is more beautiful still.

Mainstream code these days is based around the idea of frameworks. If you want
to build a web application, then you find a purpose-build language for doing
this, and a mainstream webserver, and you build your app a bit like lego from
these building blocks. There is sense to it. Down the line someone you'll
discover you need some vast new feature like SSL. Rather than build it
yourself, you can just flick on a switch to get the thing that you want, which
is already there waiting in case you ever need it.

But what Ulf has done harks back to a much older tradition. Where all you had
was an operating system. The hacker must understand all the ideas in play, and
then just write all the code that realises their goal.

Best-of-breed systems are still written like this, by people who intimately
understand their domain and who drive their tools rather than being driven by
them.

I've been semi-consciously chipping my way into this thinking for as long as I
can remember. But I'm still prone to thinking in frameworks. A few weeks ago,
I thought this post would be about what a good foundation for a 7-day
roguelike Zoo would make. Maybe it could be used like this. You could, but
what would be the point?

Zoo reminds me of the mysterious richness that unix projected when I
encountered it as a teenager. It's a beautiful study.