Spielerando

First Game With Regenerating Health? Crisis Mountain (1982)

The usual answer is Hydlide, a Japanese action role-playing game from December 1984 in which health comes back while you stand still. The manual of Crisis Mountain, an Apple II game from 1982, already says that a hurt player will "gradually heal" if they avoid further injury, which makes it the earliest case we can document. Who counts as first depends on what you count as regeneration.

Who claims what?

Source Claim
Crisis Mountain manual (1982) With a strength of 1 or 2 out of 3, "you will gradually 'heal' one point at a time (if you can avoid further injury)"
Wikipedia, Health (game terminology) Describes the same for Crisis Mountain, citing the manual, and calls Hydlide's bar a step further
John Szczepaniak, Kinephanos (2015) Calls Hydlide "the earliest documented example of a recharging health bar", ahead of Ys and of Halo's shields
GamesRadar (Jeff Dunn, 2012) "The earliest known example" is Hydlide, a 1984 computer game first released only in Japan
PC Gamer (Jody Macgregor, 2018) Hydlide, on Japanese home computers in 1984, gave hit points back when the player stood still, earlier than the shooter MIDI Maze
Film Stories (Ian Dransfield, 2021) The earliest it knows of is Punch-Out!!, arcade, 1984, "technically stamina", closely followed by Hydlide

The Hydlide claims are not independent. Wikipedia's Hydlide article rests on two pieces by Szczepaniak, and its health article cites Dunn for the later steps. Crisis Mountain rests on its own manual, which we read in the scanned copy. Punch-Out!! is a different case: Wikipedia, citing a 1984 magazine, says its stamina meter refills each time the player lands a punch, not by waiting.

How did regenerating health change over the years?

When Game What changed Source
1982 Crisis Mountain Strength from 3 down to 0 creeps back one point at a time as long as the player avoids further injury Manual, Wikipedia
13 Dec 1984 Hydlide Health comes back slowly while the player stands still Wikipedia, citing Famitsu for the date
1987 Ys I: Ancient Ys Vanished Health refills only in the overworld and in rooms where a boss was beaten GamesRadar
15 Nov 2001 Halo: Combat Evolved A shield in front of health recharges when no damage is taken for a short time; health itself still needs health packs Wikipedia, citing the manual
11 Dec 2002 The Getaway Full health back by leaning against a wall, with no health meter at all; damage shows as a limp and blood on the suit Wikipedia, citing Eurogamer; GamesRadar
25 Oct 2005 Call of Duty 2 Health is restored only by recharging when the player is not under fire Wikipedia (no footnote on this sentence)
2005 to 2006 Condemned: Criminal Origins, Prey, F.E.A.R. A floor on healing: after falling below around 25% of health, regeneration no longer climbs back above that line PC Gamer
22 Sep 2009 Halo 3: ODST Medical packs return. Story director Joseph Staten said the health system adds tension: "it reminds you that you're vulnerable" Wikipedia, citing a Bungie video
July 2015 Doom (released 2016) Left out on purpose. Executive producer Marty Stratton: "There's no regenerative health", because the game is built on movement and regeneration would reward hiding in cover Tech Times

PC Gamer's history adds an irony: Halo is credited with popularising regenerating health although it did not really have it, since its health bar could only be refilled with medkits. GamesRadar calls the form most players know today, hiding until the wounds go away, best traced to The Getaway. Film Stories gives that role to Halo 2.

Why did the designers do it?

Notes from a Bungie talk on Halo's AI at GDC 2002 give a reason that has nothing to do with realism: "In Halo the Player was equipped with a recharging shield", which "allowed him to take temporary damage so we could show him that he was using the wrong tactic without killing him." The 2015 Doom statement is the same reasoning turned around: a game about moving does not want the player to stop and wait.

We found no statement from the makers of Crisis Mountain, Hydlide, The Getaway or Call of Duty 2 on why they chose it.

What counts as regenerating health?

  • Healing over time while you avoid injury. Crisis Mountain, 1982, fits, on its own manual.
  • Healing while you stand still. Hydlide, 1984, fits.
  • A meter that refills when you land hits. Punch-Out!! fits, but that is a reward for attacking, not waiting.
  • A shield that recharges over health that does not. Halo: Combat Evolved, 2001, fits. By this definition Halo has no regenerating health.
  • Full health back after a pause out of danger. The Getaway, 2002, and Call of Duty 2, 2005, fit.
  • Healing that stops at a limit. The floor in Condemned, Prey and F.E.A.R. fits.

What can we say with confidence?

Crisis Mountain, 1982, is the earliest game we can document with healing that comes back on its own, from its own manual. Hydlide, 1984, is the game most histories name, on sources that lead back to two writers. Halo made the idea famous with a shield rather than health, and The Getaway and Call of Duty 2 are the documented steps to full health that returns after a pause.

Build it today

Our health regeneration blueprint is the form of The Getaway and Call of Duty 2: healing starts only after a wait without being hit, every hit starts the wait again, and the healing eases in instead of snapping on. It stops at a ceiling that you can set below full health, which is the simple form of the limit Condemned, Prey and F.E.A.R. used; their version, where a deep wound lowers the limit, would be a change on top. It never brings back a character who is down, and heal items still work at any time. Halo's shield in front of health is not in it: that would be a second bar with its own wait.

Add "Health Regeneration" to my game.

What it should do: Self-healing lets the player take a risk, retreat and recover, instead of hunting for medical kits. It rewards stepping out of the fight, and the wait stops it from making every hit free.

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

```mermaid
stateDiagram-v2
  [*] --> full
  full: Healthy
  wait: Waiting
  heal: Healing
  down: Down
  full --> wait: takes a hit
  full --> heal: hit, with no wait
  full --> down: knocked out
  wait --> heal: wait is over
  wait --> full: item restores health
  wait --> down: knocked out
  heal --> wait: takes a hit
  heal --> full: health restored
  heal --> down: knocked out
  down --> [*]
```

Use these starting values:
- maxHealth: 100 units
- regenRate: 12 units/s
- regenDelay: 4 s
- rampTime: 1.5 s
- regenCeiling: 1 share of full

Watch out for these common mistakes:
- Healing brings back the dead: Tell your AI: when health is zero, healing by itself does nothing. Only an item or a respawn can bring a character back.
- Healing in the moment of a hit: Tell your AI: when a hit lands, restart the wait and the easing, and do not heal in that same moment.
- Fast computers heal faster: Tell your AI: heal by speed times the seconds that passed, and when a frame is long, count only the seconds after the wait.
- A heal item is lost at the ceiling: Tell your AI: the ceiling only stops regeneration. Never lower health that is already above it.
- A hit of zero holds healing back: Tell your AI: only a hit above zero restarts the wait. Zero, below zero or something that is not a number does nothing.

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)
/* Health regeneration: health that comes back by itself once the character has been left alone for a
   while. Every hit restarts the wait, and the healing eases in instead of snapping on. It stops at a
   ceiling, which may be below full, and it never touches the dead. Heal items work at any time and
   may lift health above the ceiling; nothing here takes that extra health away.

   Time comes in as `dt`. There is no randomness here. */

export interface Params {
  /** Full health, units. */
  maxHealth: number;
  /** Healing speed once it has eased in, units/s. Above zero: with none, the character would never recover. */
  regenRate: number;
  /** Time without a hit before healing starts, s. */
  regenDelay: number;
  /** Time healing takes to reach full speed, s. Zero means it starts at full speed. */
  rampTime: number;
  /** Healing stops at this share of full health. */
  regenCeiling: number;
}

export const DEFAULT_PARAMS: Params = { maxHealth: 100, regenRate: 12, regenDelay: 4, rampTime: 1.5, regenCeiling: 1 };

/** Summing dt leaves rounding error: a timer counts as run out below this. */
const TIMER_EPSILON = 1e-9;

export interface State {
  health: number;
  /** Time left before healing may start, s. */
  delayLeft: number;
  /** How long healing has been going without a break, s. */
  healingFor: number;
  /** Damage the last tick took off, units. */
  hurt: number;
  /** Health the last tick gave back by regeneration, units. */
  regained: number;
}

export interface Input {
  /** Damage this tick. Zero, below zero or not a number counts as no hit. */
  damage: number;
  /** Healing from an item this tick. Zero, below zero or not a number counts as none. */
  heal: number;
}

export const CALM: Input = { damage: 0, heal: 0 };

export function initialState(params: Params = DEFAULT_PARAMS): State {
  return { health: params.maxHealth, delayLeft: 0, healingFor: 0, hurt: 0, regained: 0 };
}

export type Phase = "full" | "wait" | "heal" | "down";

/** Which state of the diagram the character is in. */
export function phase(state: State, params: Params = DEFAULT_PARAMS): Phase {
  if (state.health <= 0) return "down";
  if (state.health >= params.maxHealth * params.regenCeiling) return "full";
  return state.delayLeft > TIMER_EPSILON ? "wait" : "heal";
}

function amount(value: number): number {
  return value > 0 && Number.isFinite(value) ? value : 0;
}

/** How much healing lies between `from` and `from + length` seconds into the healing, in seconds of
    full speed. The speed climbs in a straight line over `ramp` seconds and then stays level. */
function easedTime(from: number, length: number, ramp: number): number {
  if (length <= 0) return 0;
  if (ramp <= 0) return length;
  const to = from + length;
  if (from >= ramp) return length;
  if (to <= ramp) return (to * to - from * from) / (2 * ramp);
  return (ramp * ramp - from * from) / (2 * ramp) + (to - ramp);
}

export function step(state: State, input: Input, params: Params, dt: number): State {
  const held = Math.min(state.health, params.maxHealth);
  // The dead stay dead: healing never brings anyone back.
  if (held <= 0) return { health: 0, delayLeft: 0, healingFor: 0, hurt: 0, regained: 0 };

  const hurt = Math.min(amount(input.damage), held);
  if (hurt > 0) {
    const health = held - hurt;
    if (health === 0) return { health: 0, delayLeft: 0, healingFor: 0, hurt, regained: 0 };
    // A hit restarts the wait and the easing, and nothing heals in the tick of the hit.
    return { health: Math.min(params.maxHealth, health + amount(input.heal)), delayLeft: params.regenDelay, healingFor: 0, hurt, regained: 0 };
  }

  const ceiling = params.maxHealth * params.regenCeiling;
  const afterItem = Math.min(params.maxHealth, held + amount(input.heal));
  const delayLeft = Math.max(0, state.delayLeft - dt);
  if (afterItem >= ceiling) return { health: afterItem, delayLeft, healingFor: 0, hurt: 0, regained: 0 };

  // Only the part of the tick after the wait counts as healing time.
  const healTime = Math.max(0, dt - state.delayLeft);
  const regained = Math.min(params.regenRate * easedTime(state.healingFor, healTime, params.rampTime), ceiling - afterItem);
  return { health: afterItem + regained, delayLeft, healingFor: state.healingFor + healTime, hurt: 0, regained };
}
The tests the reference code passes
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import test from "node:test";
import { forAll, pick, real, seeded, type Rng } from "../../../proofs/property.ts";
import { CALM, DEFAULT_PARAMS, type Input, type Params, type State, initialState, phase, step } from "./reference.ts";

// 0.25 is exact in binary, so the times below add up without rounding.
const DT = 0.25;
const P = DEFAULT_PARAMS;
const near = (a: number, b: number, message?: string) => assert.ok(Math.abs(a - b) < 1e-9, message ?? `${a} is not ${b}`);
const input = (over: Partial<Input> = {}): Input => ({ ...CALM, ...over });

function at(health: number, over: Partial<State> = {}): State {
  return { health, delayLeft: 0, healingFor: 0, hurt: 0, regained: 0, ...over };
}

function run(state: State, i: Input, ticks: number, params: Params = P, dt = DT): State {
  let s = state;
  for (let n = 0; n < ticks; n++) s = step(s, i, params, dt);
  return s;
}

test("waits-before-healing", () => {
  let s = step(at(100), input({ damage: 40 }), P, DT);
  assert.equal(s.health, 60);
  assert.equal(s.hurt, 40);
  s = run(s, CALM, 16);
  assert.equal(s.health, 60);
  s = step(s, CALM, P, DT);
  assert.ok(s.health > 60);
});

test("eases-up-to-full-speed", () => {
  // Over the first 1.5 s of healing the speed climbs from 0 to 12, so 9 come back. After that, 12 a second.
  const start = at(10);
  near(run(start, CALM, 6).health, 10 + 9);
  near(run(start, CALM, 10).health, 10 + 9 + 12);
});

test("a-hit-restarts-the-wait", () => {
  let s = run(step(at(100), input({ damage: 50 }), P, DT), CALM, 24);
  assert.ok(s.health > 50);
  const before = s.health;
  s = step(s, input({ damage: 5 }), P, DT);
  assert.equal(s.health, before - 5);
  assert.equal(s.delayLeft, 4);
  assert.equal(s.healingFor, 0);
  s = run(s, CALM, 16);
  assert.equal(s.health, before - 5);
});

test("stops-at-the-ceiling", () => {
  const params: Params = { ...P, regenCeiling: 0.5 };
  const s = run(at(40), CALM, 80, params);
  assert.equal(s.health, 50);
  assert.equal(phase(s, params), "full");
});

test("keeps-health-above-the-ceiling", () => {
  const params: Params = { ...P, regenCeiling: 0.5 };
  const s = run(at(80), CALM, 80, params);
  assert.equal(s.health, 80);
  assert.equal(s.regained, 0);
});

test("stops-at-full", () => {
  assert.equal(run(at(95), CALM, 60).health, 100);
});

test("the-dead-stay-dead", () => {
  const s = run(at(0), input({ heal: 50 }), 400);
  assert.equal(s.health, 0);
  assert.equal(phase(s), "down");
});

test("overkill-ends-at-zero", () => {
  const s = step(at(20), input({ damage: 500 }), P, DT);
  assert.equal(s.health, 0);
  assert.equal(s.hurt, 20);
  assert.equal(phase(s), "down");
});

test("zero-damage-does-not-restart-the-wait", () => {
  let s = at(50, { delayLeft: 1 });
  for (const damage of [0, -5, Number.NaN]) s = step(s, input({ damage }), P, DT);
  near(s.delayLeft, 0.25);
  assert.equal(s.health, 50);
});

test("item-heals-during-the-wait", () => {
  const s = step(at(40, { delayLeft: 3 }), input({ heal: 30 }), P, DT);
  assert.equal(s.health, 70);
  near(s.delayLeft, 2.75);
  assert.equal(s.regained, 0);
});

test("same-speed-at-any-frame-rate", () => {
  const totals = [1 / 240, 1 / 60, 1 / 15, 0.25].map((dt) => {
    let s = at(10);
    for (let t = 0; t < 8 - 1e-9; t += dt) s = step(s, CALM, P, dt);
    return s.health;
  });
  // 8 s of healing with the wait over: 9 for the easing, then 6.5 s at 12.
  for (const health of totals) assert.ok(Math.abs(health - (10 + 9 + 78)) < 0.5, totals.join(", "));
});

// The cases from edgeCases.

test("edge-healing-does-not-bring-back-the-dead", () => {
  const s = step(at(0, { delayLeft: 0, healingFor: 5 }), CALM, P, 10);
  assert.equal(s.health, 0);
});

test("edge-no-healing-in-the-tick-of-a-hit", () => {
  const s = step(at(50, { healingFor: 5 }), input({ damage: 10 }), P, DT);
  assert.equal(s.health, 40);
  assert.equal(s.regained, 0);
});

test("edge-a-slow-frame-does-not-heal-more", () => {
  // One 10 s tick against forty 0.25 s ticks.
  const slow = step(at(10, { delayLeft: 4 }), CALM, P, 10);
  const fast = run(at(10, { delayLeft: 4 }), CALM, 40);
  near(slow.health, fast.health);
});

test("edge-items-are-not-cut-back-to-the-ceiling", () => {
  const params: Params = { ...P, regenCeiling: 0.5 };
  assert.equal(step(at(30), input({ heal: 60 }), params, DT).health, 90);
});

test("edge-a-hit-and-an-item-in-one-tick", () => {
  assert.equal(step(at(50), input({ damage: 20, heal: 10 }), P, DT).health, 40);
  // A hit that kills ends it; the item does not save the character.
  assert.equal(step(at(10), input({ damage: 20, heal: 50 }), P, DT).health, 0);
});

const LISTED: { name: keyof Params; min: number; max: number }[] = JSON.parse(readFileSync(new URL("./mechanic.json", import.meta.url), "utf8")).spec.parameters;

function anyParams(r: Rng): Params {
  const values = LISTED.map(({ name, min, max }) => [name, pick(r, [min, max, real(r, min, max), real(r, min, max)])]);
  return Object.fromEntries(values);
}

function anyInput(r: Rng, params: Params): Input {
  return {
    damage: pick(r, [0, 0, 0, 0, 0, 0, real(r, -5, params.maxHealth * 0.3), real(r, 0, params.maxHealth * 1.2)]),
    heal: pick(r, [0, 0, 0, 0, 0, 0, 0, real(r, -5, params.maxHealth * 0.5)]),
  };
}

test("property: health stays between zero and full", (t) => {
  forAll(t, 91, 500, (r) => {
    const params = anyParams(r);
    let s = initialState(params);
    for (let tick = 0; tick < 400; tick++) {
      s = step(s, anyInput(r, params), params, real(r, 1 / 240, 1 / 15));
      assert.ok(s.health >= 0 && s.health <= params.maxHealth, `health ${s.health}`);
    }
  });
});

test("property: healing never rises past the ceiling, never takes health away, and never revives", (t) => {
  forAll(t, 92, 500, (r) => {
    const params = anyParams(r);
    let s = initialState(params);
    const ceiling = params.maxHealth * params.regenCeiling;
    for (let tick = 0; tick < 400; tick++) {
      const before = s;
      const i = anyInput(r, params);
      s = step(s, i, params, real(r, 1 / 240, 1 / 15));
      if (before.health <= 0) assert.equal(s.health, 0);
      if (s.regained > 0) {
        assert.ok(s.health <= ceiling + 1e-9);
        assert.equal(s.hurt, 0);
      }
      if (s.hurt === 0 && i.heal <= 0) assert.ok(s.health >= Math.min(before.health, params.maxHealth));
    }
  });
});

test("property: nothing heals while the wait runs", (t) => {
  forAll(t, 93, 500, (r) => {
    const params = anyParams(r);
    let s = initialState(params);
    for (let tick = 0; tick < 400; tick++) {
      const before = s;
      s = step(s, anyInput(r, params), params, real(r, 1 / 240, 1 / 15));
      if (before.delayLeft > 1 / 15 + 1e-9 && s.health > 0) assert.equal(s.regained, 0);
    }
  });
});

/* The diagram in mechanic.json. Moves that stay in the same state are not moves, so only changes are
   compared. */
const MODEL: { states: { id: string; start?: boolean }[]; moves: { from: string; to: string }[] } = JSON.parse(readFileSync(new URL("./mechanic.json", import.meta.url), "utf8")).model;

/** The state changes seen when a seeded player is hit now and then, heals, and is sometimes left alone. */
function observe(params: Params, seed: number, dt = 1 / 30): { changes: Set<string>; seen: Set<string> } {
  const r = seeded(seed);
  const script: Input[] = [];
  const hold = (i: Input, seconds: number) => {
    for (let n = 0; n < Math.ceil(seconds / dt); n++) script.push(i);
  };
  const full = params.maxHealth;
  const calm = params.regenDelay + params.rampTime + full / params.regenRate + 2;
  hold(input({ damage: full * 0.3 }), dt); // full to wait (or heal)
  hold(CALM, calm); // wait to heal to full
  hold(input({ damage: full * 0.3 }), dt);
  hold(CALM, params.regenDelay + params.rampTime + 0.5); // into healing
  hold(input({ damage: full * 0.1 }), dt); // heal to wait
  hold(input({ heal: full }), dt); // an item heals to full
  hold(CALM, 1);
  hold(input({ damage: full * 0.2 }), dt);
  hold(input({ heal: full }), dt); // wait to full
  hold(input({ damage: full * 0.3 }), dt);
  hold(CALM, params.regenDelay + dt * 2 + params.rampTime + 0.5);
  hold(input({ damage: full * 2 }), dt); // heal to down
  hold(CALM, 1);
  // A fresh life: a hit that kills from full, one that kills while waiting.
  let s = initialState(params);
  const changes = new Set<string>();
  const seen = new Set([phase(s, params)]);
  const feed = (i: Input) => {
    const before = phase(s, params);
    s = step(s, i, params, dt);
    const after = phase(s, params);
    seen.add(after);
    if (after !== before) changes.add(`${before}>${after}`);
  };
  for (const i of script) feed(i);
  for (const kill of [(): void => { s = initialState(params); }, (): void => { s = step(initialState(params), input({ damage: full * 0.2 }), params, dt); }, (): void => { s = run(step(initialState(params), input({ damage: full * 0.4 }), params, dt), CALM, Math.ceil((params.regenDelay + params.rampTime) / dt) + 2, params, dt); }]) {
    kill();
    feed(input({ damage: full * 3 }));
  }
  // Then a seeded wander with a living character.
  s = initialState(params);
  for (let n = 0; n < 6000; n++) {
    feed(n % 700 < 350 ? (r() < 0.01 ? input({ damage: full * r() * 0.4 }) : CALM) : r() < 0.15 ? input({ damage: full * r() * 0.15, heal: r() < 0.2 ? full * 0.2 : 0 }) : CALM);
    if (s.health <= 0) s = initialState(params);
  }
  return { changes, seen };
}

test("model-matches-code", () => {
  assert.equal(phase(initialState()), MODEL.states.find((s) => s.start)?.id);
  const listed = new Set(MODEL.moves.map((m) => `${m.from}>${m.to}`));
  const ids = new Set(MODEL.states.map((s) => s.id));
  const cases: { params: Params; dt: number }[] = [{ params: P, dt: 1 / 30 }];
  for (const { name, min, max } of LISTED) for (const value of [min, max]) cases.push({ params: { ...P, [name]: value }, dt: 1 / 30 });
  // With no wait, healing starts in the tick of the hit, and a slow frame can heal everything at once.
  cases.push({ params: { ...P, regenDelay: 0, rampTime: 0, regenRate: 200 }, dt: 1 / 15 });
  const allChanges = new Set<string>();
  const allSeen = new Set<string>();
  cases.forEach(({ params, dt }, i) => {
    const { changes, seen } = observe(params, 500 + i, dt);
    for (const move of changes) assert.ok(listed.has(move), `the code does a move the diagram does not list: ${move} (case ${i})`);
    for (const id of seen) assert.ok(ids.has(id), `the code reaches a state the diagram does not list: ${id}`);
    changes.forEach((c) => allChanges.add(c));
    seen.forEach((c) => allSeen.add(c));
  });
  for (const id of ids) assert.ok(allSeen.has(id), `the diagram lists a state the code never reaches: ${id}`);
  for (const move of listed) assert.ok(allChanges.has(move), `the diagram lists a move the code never makes: ${move}`);
});

Open the blueprint: Health Regeneration

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