Jeffrey M. Barber

Tombstone

ComboLang

Mar 2005 · age 23

What it was

A tiny language for fighting-game combos, written in OCaml with camlp4 in a single Sunday afternoon. A combo is a regular expression over joystick inputs: a comma sequences inputs, a plus offers alternatives, a question mark matches any of the eight directions, a percent sign matches nothing, and an equals sign names the move. The sample defined a Shoryuken, an uppercut with optional diagonals, a full-circle attack written out in all eight rotations, and a throw. The compiler expands each pattern into every concrete input sequence it can match, then prints one C if statement per sequence, comparing slots of an input buffer and returning the move. The whole compiler is one expansion function and a printer: 189 lines in six modules, and 32 lines of generated C. It was built, run, checked in, and never revised.

Wins, for the age

What it taught

Genealogy

Ancestors: none on record. One afternoon, one idea. Descendants: Kitchen Grill: a game scripting language, compiled, for the next engine.

Epitaph

Here lies ComboLang, five constructors and a cartesian product, which taught a joystick buffer to recognize a Shoryuken from the last input backwards.