Spielerando

First Game With a Tech Tree? Tresham's Civilization (1980)

Most sources credit Francis Tresham's board game Civilization, published in Britain in 1980, with introducing the technology tree. The lead designer of Civilization IV calls that board game linear, and the branching chart of prerequisites most people mean by a tech tree is documented in Sid Meier's Civilization of 1991. So the answer depends on what you count as a tree.

Who claims what?

Source Claim
Wikipedia, Technology tree "Typically the board game Civilization by Francis Tresham (1980) is given the credit of introducing a technology tree"
Wikipedia, Civilization (1980 board game) Says the game "is also first in incorporating a technology tree", citing a 2012 Game Studies article we could not open
Will Slocombe (2019) The board game "is often credited as being the first game to incorporate a 'technology tree'", without a source for the credit
Benj Edwards, Game Developer (2007) Says Sid Meier "also created the famous 'technology tree'" for the 1991 computer game
Soren Johnson, lead designer of Civilization IV, quoted by Edwards "The board game [is] quite linear. The difference in Civilization is that it branches"
Wikipedia talk page (2014 and 2016) Editors dispute the claim: one says the only hard prerequisite was Law, another points to the discounts cards give, a third calls the credit possibly "just an urban legend"

The credit to the board game is repeated widely, but none of the sources we could open shows where it began. Wikipedia and Slocombe state it without a source of their own, and Wikipedia's other sentence, that the first tree "refers to Civilization", does not say which Civilization.

What did the 1980 board game actually do?

A review in Games International from January 1990 describes the rules. Players buy civilization cards, and "the purchase price is equal to the card value but, in practice, it may be decreased by cards already held". Literacy and Architecture together "knock forty points off the price of Law". Moving from one epoch to the next on the Archaeological Succession Table needs, for example, two cities, then cards from three colour groups, then seven cards.

That is a web of discounts and thresholds, not a chart of locks. Whether you call it a tree is the whole dispute.

Did the board game shape the 1991 computer game?

The designers disagree. Meier told Edwards: "I had not played that before I did Civilization." His co-designer Bruce Shelley: "I had played it many times ... I believe Sid had a copy of the game and looked at the components." Maher, writing in 2018, reports that Meier has claimed to have played the board game only once, and still sees an advances chart "not at all far removed" from the computer game's in the board game's deck of cards.

How did the tech tree change over the years?

When Game What changed Source
Announced Dec 1966, play from Sep 1967 Xeno, a game played by post Players got better engines, weapons and shields every eight turns they survived. Maher calls it "a tech tree of sorts". A precursor: upgrades come with time, not research The Digital Antiquarian
1980 (UK), 1981 (US) Civilization, board game Cards bought with trade, cheaper for each related card already held, and epochs that need set numbers of cities and cards Games International, Game Developer
1984 Incunabula Avalon Hill's computer game based on the board game, for MS-DOS Game Developer
December 1991 Sid Meier's Civilization The Advances Chart: research builds up over time, and each advance needs others first, so that Mysticism needs Ceremonial Burial. Meier: it "began as a way of gradually opening up possibilities" Game Developer, The Digital Antiquarian
Autumn 1992 Dune II In real-time strategy the tree becomes buildings: an outpost is needed before any new units can be built. Maher counts Civilization's tech tree among its influences The Digital Antiquarian
1993 Master of Orion Each race gets a random selection of about half the technologies, and paying for research brings only a slowly rising chance of getting it each turn The Digital Antiquarian
October 2016 Civilization VI "Eureka moments" speed up research when the player completes a related task, and culture moves into a separate civics tree Wikipedia

Edwards's timeline gives 1991 for the computer game; Maher says it shipped in December 1991.

When did people start saying "tech tree"?

Maher notes that Master of Orion in 1993 "talks about a 'tech tree', while Civilization prefers the word 'advances'". The Civilization II manual has a section called "Climbing the technology tree" and a poster with "a graphic technology tree, or flowchart, that lists every civilization advance". The scan we read is a later printing, with page headers from 2000. We found no source that names who first used either phrase.

What counts as a tech tree?

  • Upgrades that arrive over time. Xeno, 1966 to 1967, fits, but nothing is chosen or researched.
  • Advances bought with discounts from earlier ones. The 1980 board game fits, and this is the version most sources credit.
  • A branching chart where each advance needs others first, researched over time. Sid Meier's Civilization, 1991, is the earliest documented in the sources we read.
  • Buildings as prerequisites. Dune II, 1992, fits.
  • A tree partly hidden or left to chance. Master of Orion, 1993, fits.

What can we say with confidence?

Francis Tresham's Civilization, 1980, is the game the sources credit, but none we could open shows where that credit comes from, and its mechanism was discounts more than locks. Sid Meier's Civilization, 1991, is the earliest game we can document with the branching chart of prerequisites the term usually means today. Whether the board game led to it is disputed by the two people who made the computer game.

Build it today

Our tech tree blueprint is research in the 1991 sense: projects with a price, an amount of work and other projects that must be finished first, one running at a time while the rest wait in a queue. The rules that go wrong are fixed in it: the price is paid when a project starts, not when it is queued; a project can wait behind the one it needs but never ahead of it; leftover time at the end of one project goes to the next; and cancelling gives back only part of the price, so cancelling and restarting never makes money. A tree with a loop or a missing project is refused. The board game's discounts, Master of Orion's random selection and Civilization VI's eureka boosts are not in it; each would be a rule to ask your AI for on top.

Add "Tech Tree" to my game.

What it should do: A tech tree gives the player a long goal to plan toward. Choosing what to research next, and waiting for it, makes each unlock feel earned and shapes how the player plays in between.

Build it exactly as this state machine. First check that it fits my game, then build it like this:

```mermaid
stateDiagram-v2
  [*] --> idle
  idle: Nothing queued
  researching: Researching
  stalled: Waiting for money
  idle --> researching: queues, can pay
  idle --> stalled: queues, cannot pay
  stalled --> researching: income covers the price
  stalled --> idle: queue cancelled
  researching --> idle: last one ends or goes
  researching --> stalled: ends, next unaffordable
```

Use these starting values:
- researchRate: 1 work/s
- cancelRefund: 0.5 x
- queueLimit: 4 projects
- startingBank: 25 money

Watch out for these common mistakes:
- Paying at the wrong moment: Tell your AI: take the price when the project starts, and let it wait without a price while it is in the queue.
- A cancelled project that others wait on: Tell your AI: when a project goes, take out every queued project that needs it, and every project that needs those.
- Time lost between two projects: Tell your AI: carry the rest of the time over to the next project in the same tick.
- Cancel and restart for money: Tell your AI: refund only a share of the price, less for work already done, and lose the work, so a restart always costs something.
- Waiting for money with nothing to say: Tell your AI: keep that state apart from idle, show that research is waiting for money, and start the project the moment income covers it.
- Tree with a loop or a missing project: Tell your AI: check the whole tree once, when the game loads, and list every loop and every missing project.

Do not change anything else in the game. Do not claim anything without proof: model what it takes, and show me what your solution rests on and how I can see that it works. If you cannot show something, say you do not know. When you are done, tell me in plain words how to try it.

The button copies this text together with the tested code below, so your AI has everything.

The tested code (TypeScript)
/* A tech tree: projects the player researches over time. Each one has a price, an amount of work and
   other projects that must be finished first. One project runs at a time, the rest wait in a queue.
   Unlike a skill tree, which is bought at once with points, research takes time, and the time is
   what has to be handled with care.

   Rules that go wrong. The price is paid when a project starts, not when it is queued, so a queue
   costs nothing until its turn. A project can be queued behind the one it needs, but it can never be
   queued ahead of it, and taking a project out of the queue takes out everything waiting on it.
   Time is carried over: when one project ends in the middle of a tick, the rest of that tick goes to
   the next one. Cancelling gives back only part of the price, less for work already done, and the work
   is lost, so cancelling and restarting is never a way to make money.

   `phase` names where the research is, for the model in mechanic.json. Time and money come in as
   values: dt is seconds, income is an amount. */

export interface Params {
  /** Work done per second. */
  researchRate: number;
  /** Share of the price handed back for the unfinished part of a cancelled project. */
  cancelRefund: number;
  /** Projects that may wait behind the running one. */
  queueLimit: number;
  /** Money in the bank at the start. */
  startingBank: number;
}

export const DEFAULT_PARAMS: Params = { researchRate: 1, cancelRefund: 0.5, queueLimit: 4, startingBank: 25 };

export interface Tech {
  id: string;
  /** Paid when the project starts. */
  cost: number;
  /** Work needed; takes work / researchRate seconds. */
  work: number;
  requires: string[];
}

export const EXAMPLE_TREE: Tech[] = [
  { id: "pottery", cost: 10, work: 5, requires: [] },
  { id: "weaving", cost: 10, work: 5, requires: [] },
  { id: "irrigation", cost: 20, work: 10, requires: ["pottery"] },
  { id: "looms", cost: 20, work: 10, requires: ["weaving"] },
  { id: "dyes", cost: 30, work: 12, requires: ["pottery", "weaving"] },
  { id: "trade", cost: 50, work: 20, requires: ["irrigation", "looms"] },
];

export interface State {
  tree: Tech[];
  bank: number;
  /** Finished projects, in the order they finished. */
  researched: string[];
  /** The running project and the work done on it. */
  active: { id: string; progress: number } | null;
  /** Waiting projects, in order. */
  queue: string[];
}

export type Action = { type: "enqueue"; tech: string } | { type: "cancel"; tech: string } | { type: "income"; amount: number } | { type: "tick"; dt: number };

export type Phase = "idle" | "researching" | "stalled";

/** Summing time leaves rounding error: a project is done when the time it still needs is this small. */
export const TIME_EPSILON = 1e-9;

export function initialState(params: Params = DEFAULT_PARAMS, tree: Tech[] = EXAMPLE_TREE): State {
  return { tree, bank: params.startingBank, researched: [], active: null, queue: [] };
}

export function phase(state: State): Phase {
  if (state.active) return "researching";
  return state.queue.length > 0 ? "stalled" : "idle";
}

const find = (state: Pick<State, "tree">, id: string) => state.tree.find((t) => t.id === id);

/** Problems that make a tree unusable: unknown projects, projects needing themselves, bad numbers. */
export function validateTree(tree: Tech[]): string[] {
  const problems: string[] = [];
  const ids = new Set<string>();
  for (const t of tree) {
    if (ids.has(t.id)) problems.push(`"${t.id}" appears twice`);
    ids.add(t.id);
    if (!(t.cost >= 0) || !(t.work > 0)) problems.push(`"${t.id}" needs a cost of 0 or more and work above 0`);
  }
  for (const t of tree) for (const r of t.requires) if (!ids.has(r)) problems.push(`"${t.id}" needs "${r}", which does not exist`);
  const byId = new Map(tree.map((t) => [t.id, t]));
  const mark = new Map<string, "open" | "done">();
  const visit = (id: string, trail: string[]): void => {
    if (mark.get(id) === "done") return;
    if (mark.get(id) === "open") {
      problems.push(`a loop: ${[...trail, id].join(" -> ")}`);
      return;
    }
    mark.set(id, "open");
    for (const r of byId.get(id)?.requires ?? []) if (byId.has(r)) visit(r, [...trail, id]);
    mark.set(id, "done");
  };
  for (const t of tree) visit(t.id, []);
  return problems;
}

/** The tech and everything in the queue that waits on it, however far down. */
function withDependants(state: State, tech: string): Set<string> {
  const gone = new Set([tech]);
  let grew = true;
  while (grew) {
    grew = false;
    for (const id of state.queue) {
      if (!gone.has(id) && find(state, id)?.requires.some((r) => gone.has(r))) {
        gone.add(id);
        grew = true;
      }
    }
  }
  return gone;
}

/** Starts the first waiting project if nothing runs and its price can be paid. */
function start(state: State): State {
  if (state.active || state.queue.length === 0) return state;
  const head = find(state, state.queue[0]);
  if (!head || state.bank < head.cost) return state;
  return { ...state, bank: state.bank - head.cost, active: { id: head.id, progress: 0 }, queue: state.queue.slice(1) };
}

function advance(state: State, dt: number, params: Params): State {
  let s = start(state);
  let remaining = dt;
  while (remaining > 0 && s.active) {
    const tech = find(s, s.active.id) as Tech;
    const needed = (tech.work - s.active.progress) / params.researchRate;
    if (needed <= remaining + TIME_EPSILON) {
      // Finished part-way through the tick: the rest of the tick goes on to the next project.
      remaining -= needed;
      s = start({ ...s, researched: [...s.researched, tech.id], active: null });
    } else {
      s = { ...s, active: { id: tech.id, progress: s.active.progress + params.researchRate * remaining } };
      remaining = 0;
    }
  }
  return s;
}

export function reduce(state: State, action: Action, params: Params = DEFAULT_PARAMS): State {
  switch (action.type) {
    case "enqueue": {
      const tech = find(state, action.tech);
      if (!tech || state.researched.includes(tech.id) || state.active?.id === tech.id || state.queue.includes(tech.id)) return state;
      if (state.queue.length >= params.queueLimit) return state;
      // Each need must be finished, running, or ahead of this one in the queue.
      const ahead = (id: string) => state.researched.includes(id) || state.active?.id === id || state.queue.includes(id);
      if (!tech.requires.every(ahead)) return state;
      return start({ ...state, queue: [...state.queue, tech.id] });
    }
    case "cancel": {
      const gone = withDependants(state, action.tech);
      if (state.active?.id === action.tech) {
        const tech = find(state, action.tech) as Tech;
        const refund = Math.floor(tech.cost * params.cancelRefund * (1 - state.active.progress / tech.work));
        return start({ ...state, bank: state.bank + refund, active: null, queue: state.queue.filter((id) => !gone.has(id)) });
      }
      if (!state.queue.includes(action.tech)) return state;
      return start({ ...state, queue: state.queue.filter((id) => !gone.has(id)) });
    }
    case "income":
      if (!Number.isFinite(action.amount) || action.amount <= 0) return state;
      return start({ ...state, bank: state.bank + action.amount });
    case "tick":
      if (!Number.isFinite(action.dt) || action.dt <= 0) return state;
      return advance(state, action.dt, params);
  }
}
The tests the reference code passes
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import test from "node:test";
import { chance, forAll, int, pick, real, seeded } from "../../../proofs/property.ts";
import { type Action, DEFAULT_PARAMS, EXAMPLE_TREE, type Params, type State, type Tech, initialState, phase, reduce, validateTree } from "./reference.ts";

const P = DEFAULT_PARAMS;

function close(actual: number, expected: number, tolerance = 1e-9): void {
  assert.ok(Math.abs(actual - expected) < tolerance, `${actual} is not ${expected}`);
}

function run(s: State, actions: Action[], params: Params = P): State {
  for (const a of actions) s = reduce(s, a, params);
  return s;
}
const queue = (...techs: string[]): Action[] => techs.map((tech) => ({ type: "enqueue", tech }));
const tick = (dt: number): Action => ({ type: "tick", dt });
const withBank = (bank: number, params: Params = P): State => ({ ...initialState(params), bank });

test("an-unfinished-prerequisite-blocks-queueing", () => {
  const s = initialState(P);
  assert.equal(reduce(s, { type: "enqueue", tech: "irrigation" }, P), s);
  assert.equal(phase(s), "idle");
});

test("a-chain-can-be-queued-in-order", () => {
  const s = run(initialState(P), queue("pottery", "irrigation", "trade"));
  // trade also needs looms, which is not there yet, so it was refused.
  assert.equal(s.active?.id, "pottery");
  assert.deepEqual(s.queue, ["irrigation"]);
});

test("cost-is-paid-when-research-starts", () => {
  let s = run(initialState(P), queue("pottery"));
  assert.equal(s.bank, 15);
  // A second project only waits, and costs nothing yet.
  s = run(s, queue("weaving"));
  assert.equal(s.bank, 15);
  assert.deepEqual(s.queue, ["weaving"]);
});

test("progress-grows-with-time", () => {
  const s = run(initialState(P), [...queue("pottery"), tick(2)]);
  close(s.active?.progress ?? -1, 2);
});

test("finishing-unlocks-the-tech", () => {
  const s = run(initialState(P), [...queue("pottery"), tick(5)]);
  assert.deepEqual(s.researched, ["pottery"]);
  assert.equal(s.active, null);
  assert.equal(phase(s), "idle");
  // What needed it can be queued now. It costs 20 and only 15 is left, so it waits for money.
  const next = run(s, queue("irrigation"));
  assert.deepEqual(next.queue, ["irrigation"]);
  assert.equal(phase(next), "stalled");
});

test("leftover-time-goes-to-the-next-project", () => {
  const s = run(withBank(100), [...queue("pottery", "irrigation"), tick(7)]);
  assert.deepEqual(s.researched, ["pottery"]);
  assert.equal(s.active?.id, "irrigation");
  close(s.active?.progress ?? -1, 2);
  assert.equal(s.bank, 100 - 10 - 20);
});

test("a-project-that-cannot-be-paid-waits", () => {
  const s = run(withBank(5), [...queue("pottery"), tick(100)]);
  assert.equal(phase(s), "stalled");
  assert.equal(s.bank, 5);
  assert.deepEqual(s.researched, []);
});

test("income-starts-a-waiting-project", () => {
  const s = run(withBank(5), [...queue("pottery"), { type: "income", amount: 5 }]);
  assert.equal(phase(s), "researching");
  assert.equal(s.bank, 0);
});

test("cancelling-refunds-the-unfinished-share", () => {
  // Price 10, half back for the whole price, and 2 of 5 work done: 10 * 0.5 * 0.6 = 3.
  let s = run(initialState(P), [...queue("pottery"), tick(2)]);
  s = reduce(s, { type: "cancel", tech: "pottery" }, P);
  assert.equal(s.bank, 15 + 3);
  assert.equal(s.active, null);
  assert.deepEqual(s.researched, []);
});

test("cancel-and-restart-never-makes-money", () => {
  let s = run(withBank(40), [...queue("pottery"), tick(1)]);
  const before = s.bank;
  s = run(s, [{ type: "cancel", tech: "pottery" }, ...queue("pottery")]);
  assert.ok(s.bank < before, `${s.bank} is not below ${before}`);
  close(s.active?.progress ?? -1, 0);
});

test("cancelling-also-removes-what-waits-on-it", () => {
  let s = run(withBank(200), queue("pottery", "irrigation", "weaving", "dyes"));
  assert.deepEqual(s.queue, ["irrigation", "weaving", "dyes"]);
  s = reduce(s, { type: "cancel", tech: "pottery" }, P);
  // irrigation and dyes both needed pottery; weaving did not, and starts.
  assert.equal(s.active?.id, "weaving");
  assert.deepEqual(s.queue, []);
});

test("a-finished-tech-cannot-be-queued-again", () => {
  const s = run(initialState(P), [...queue("pottery"), tick(5)]);
  assert.equal(reduce(s, { type: "enqueue", tech: "pottery" }, P), s);
});

test("a-full-queue-refuses-more", () => {
  const p = { ...P, queueLimit: 1 };
  const s = run(withBank(500, p), queue("pottery", "weaving", "irrigation"), p);
  assert.equal(s.active?.id, "pottery");
  assert.deepEqual(s.queue, ["weaving"]);
});

test("edge: one long tick finishes several projects in order", () => {
  const s = run(withBank(500), [...queue("pottery", "weaving", "irrigation", "looms"), tick(1000)]);
  assert.deepEqual(s.researched, ["pottery", "weaving", "irrigation", "looms"]);
  assert.equal(s.bank, 500 - 10 - 10 - 20 - 20);
});

test("edge: a queue cancelled in the middle removes only what waits on it", () => {
  let s = run(withBank(500), queue("pottery", "weaving", "irrigation", "looms"));
  s = reduce(s, { type: "cancel", tech: "weaving" }, P);
  assert.deepEqual(s.queue, ["irrigation"]);
});

test("edge: a bad time or amount changes nothing", () => {
  const s = run(initialState(P), queue("pottery"));
  for (const dt of [0, -1, Number.NaN, Number.POSITIVE_INFINITY]) assert.equal(reduce(s, tick(dt), P), s);
  assert.equal(reduce(s, { type: "income", amount: -3 }, P), s);
  assert.equal(reduce(s, { type: "enqueue", tech: "nothing" }, P), s);
  assert.equal(reduce(s, { type: "cancel", tech: "trade" }, P), s);
});

test("edge: a tree with a loop or a missing need is found", () => {
  assert.deepEqual(validateTree(EXAMPLE_TREE), []);
  const loop: Tech[] = [
    { id: "a", cost: 1, work: 1, requires: ["b"] },
    { id: "b", cost: 1, work: 1, requires: ["a"] },
  ];
  assert.ok(validateTree(loop).some((p) => p.startsWith("a loop")));
  assert.ok(validateTree([{ id: "a", cost: 1, work: 1, requires: ["z"] }]).some((p) => p.includes('"z"')));
});

function randomAction(r: () => number): Action {
  const t = pick(r, ["enqueue", "enqueue", "enqueue", "cancel", "income", "tick", "tick"] as const);
  const tech = pick(r, EXAMPLE_TREE).id;
  if (t === "income") return { type: t, amount: int(r, 1, 40) };
  if (t === "tick") return { type: t, dt: chance(r, 0.1) ? real(r, 10, 60) : real(r, 0, 4) };
  return { type: t, tech };
}

test("property: the queue never holds a project ahead of what it needs", (t) => {
  forAll(t, 91, 400, (r) => {
    const params: Params = { researchRate: real(r, 0.2, 5), cancelRefund: real(r, 0, 1), queueLimit: int(r, 1, 6), startingBank: int(r, 0, 80) };
    let s = initialState(params);
    for (let i = 0; i < 200; i++) {
      s = reduce(s, randomAction(r), params);
      assert.ok(s.bank >= 0);
      const seen = new Set(s.researched);
      const all = [...(s.active ? [s.active.id] : []), ...s.queue];
      assert.equal(new Set([...all, ...s.researched]).size, all.length + s.researched.length, "a project is in two places");
      for (const id of s.researched) assert.ok(s.tree.find((x) => x.id === id)?.requires.every((q) => s.researched.indexOf(q) !== -1 && s.researched.indexOf(q) < s.researched.indexOf(id)), `${id} finished before its needs`);
      const earlier = new Set(seen);
      if (s.active) {
        assert.ok(s.tree.find((x) => x.id === s.active?.id)?.requires.every((q) => seen.has(q)));
        earlier.add(s.active.id);
      }
      for (const id of s.queue) {
        assert.ok(s.tree.find((x) => x.id === id)?.requires.every((q) => earlier.has(q)), `${id} waits ahead of a need`);
        earlier.add(id);
      }
      assert.ok(s.queue.length <= params.queueLimit);
    }
  });
});

test("property: cancelling never pays back more than was paid", (t) => {
  forAll(t, 92, 400, (r) => {
    const params: Params = { ...P, cancelRefund: real(r, 0, 1), startingBank: 500 };
    let s = run(initialState(params), queue("pottery", "irrigation"), params);
    s = reduce(s, tick(real(r, 0, 4)), params);
    if (!s.active) return;
    const cost = s.tree.find((x) => x.id === s.active?.id)?.cost ?? 0;
    const before = s.bank;
    s = reduce(s, { type: "cancel", tech: s.active.id }, params);
    assert.ok(s.bank - before <= cost * params.cancelRefund + 1e-9);
  });
});

/* The model in mechanic.json against the code, both ways. */
const mechanic = JSON.parse(readFileSync(new URL("./mechanic.json", import.meta.url), "utf8"));
const model = mechanic.model as { states: { id: string }[]; moves: { from: string; to: string }[] };
const listed = new Set(model.moves.map((m) => `${m.from}>${m.to}`));

function drive(params: Params, seed: number, steps: number, moves: Set<string>, visited: Set<string>): void {
  const r = seeded(seed);
  let s = initialState(params);
  visited.add(phase(s));
  for (let i = 0; i < steps; i++) {
    const before = phase(s);
    s = reduce(s, randomAction(r), params);
    const after = phase(s);
    visited.add(after);
    if (after !== before) moves.add(`${before}>${after}`);
    // Everything researched leaves nothing to do: start again.
    if (s.researched.length === s.tree.length) s = initialState(params);
  }
}

test("model-matches-code", () => {
  const specs = mechanic.spec.parameters as { name: keyof Params; min: number; max: number }[];
  const variants: Params[] = [P];
  for (const p of specs) for (const v of [p.min, p.max]) variants.push({ ...P, [p.name]: v });
  const moves = new Set<string>();
  const visited = new Set<string>();
  variants.forEach((params, n) => {
    const here = new Set<string>();
    for (let seed = 1; seed <= 20; seed++) drive(params, n * 100 + seed, 1500, here, visited);
    for (const move of here) assert.ok(listed.has(move), `the code does ${move}, which the model does not list (variant ${n})`);
    for (const move of here) moves.add(move);
    if (n === 0) for (const move of listed) assert.ok(here.has(move), `at the default values the model's ${move} never happens`);
  });
  for (const move of listed) assert.ok(moves.has(move), `the model's ${move} never happens`);
  for (const state of model.states) assert.ok(visited.has(state.id), `state ${state.id} is never reached`);
  for (const id of visited) assert.ok(model.states.some((s) => s.id === id), `the code reaches ${id}, which the model does not list`);
});

Open the blueprint: Tech Tree

Was this page helpful?

One click, no account. It shows us which pages help.

Next step

Origins

Which Game Had the First Double Jump? Namco's Dragon Buster

Earliest documented: Dragon Buster (Namco), December 1984 per Guinness, early 1985 per others. With a sourced timeline to 2018 and tested code to build it.

Sources

Last updated: 2026-11-26