Skip to main content

Tractor Befunge

Befunge is a classic esoteric programming language. The idea is that it's a bit like a Turing machine, but instead of the instruction pointer moving along a one-dimensional tape, it moves around a two-dimensional grid.

A happy image occurred to me of the instruction pointer as a tractor, driving around a field.

So I decided to make it happen!

I found a really nice pixel art editor called Pixelorama, which I used to draw a v v shonky tractor, patches of grass, and bales of hay representing numbers on the stack.

It's cute!

The controls were more complicated than I expected. I wanted everything to feel as "in the world" as possible, so the program should be edited by interacting with the graphics rather than typing in a code box. I ended up giving the caret a direction, so it's just as easy to type upwards or backwards as it is left-to-right. To avoid having a "reset" button, you can just pick the tractor up and move it, and right-click to empty the trailer.

Other Life stuff came up before I was completely finished with it, but I'm quite happy with my cute Turing-complete tractor.

It's online at, and the source code is on GitHub.