Tombstone
libQuest
Feb 2002 · age 20
What it was
A small C++ library for game mission logic, written in one week and documented as if strangers were waiting for it. The whole specification fit in three lines on its home page: an event is a noun, a verb and an object; a gate is ALL, ANY or NONE; a quest is an event or a gate over other quests. Every quest is completed, in limbo, or failed. When an event arrives it is pushed down to every child, their statuses are folded through the gate, and three pluggable objects do the rest: a response that judges what the event means, a filter that decides whether to look, and a reply that reacts when the status changes. The test modelled "touch two things within thirty units of time", with a reply that resets the whole tree on failure. It shipped as a beta with a manual, a class diagram and a state-propagation flow chart, and was never revised.
Wins, for the age
- At twenty, Jeff built gate trees over a three-valued status of success, limbo and failure, three years before behavior trees (Halo 2, GDC 2005) put the same success, failure and running shape at the centre of game AI.
- Made failure a first-class state, the difference players actually feel, so a mission could be reset rather than merely left unfinished.
- Wrote the spec and drew the state diagram before the code, and kept the code to about 430 lines.
- Packaged it for strangers: license, page, manual, test and diagram. The strangers never arrived. The young primate did it properly anyway.
What it taught
- A library is a specification with code attached, and a week is enough if the spec is three lines.
- Three states are the minimum for missions.
- Composition over inheritance: the quest stays generic, and all game meaning lives in the collaborators.
- Defaults matter. The default filter rejected every event, so an unsubclassed filter silently ignored the world.
Genealogy
Ancestors: Evolution 4K: the space game of the winter before, the kind that needs missions. Descendants: BSG Prototype: outcomes that wait on events, at board-game scale. Hearth: tasks that walk state machines to completion. Rage: the next engine in the line, the kind this was written to serve.
Epitaph
Here lies libQuest, whose entire specification fit on its home page, and whose only public release was dated February 33rd.