Log inGet started
World

DOOM.wad

Branchmain
Branchesmain
Commit309bbc2517

README.md

DoomGame

Singleton game state on the doom_game entity: player health, ammo, death and respawn, the HUD (health/ammo status bar + crosshair via ui.* screens), and the per-map MIDI soundtrack driven through the midi plugin.

Public fields

  • health: number — current player health; respawns at the map start when it reaches 0.
  • ammo: number — pistol ammo, decremented by DoomWeapon on each shot.
  • spawnX/spawnY/spawnZ: number — the current map's player-1 start; DoomExit updates these on a map switch.
  • musicTrack: string — the map's MUS lump name (e.g. D_E1M1); converted to MIDI on demand and played in play mode.

Usage

entity(id).component.add("DoomGame", { health = 100, ammo = 50, spawnX = 52.8, spawnY = 1.0, spawnZ = -180.8 })