ElixirDoom.Game (elixir_doom v0.1.0)

Copy Markdown View Source

Doom as a Cauldron2D.Game: an episode played level by level at 35 tics a second.

Cauldron2D.World.start_link(game: ElixirDoom.Game, game_opts: [level: "E1M1", skill: 3], hz: 35)

Options: :level to start on (default the WAD's first), :skill 1..5 (default 3), :tuning overrides for ElixirDoom.Tuning. A WAD must have been loaded with ElixirDoom.Assets.load/1 first.

A level ends at an exit; the game shows the tallies until a player presses use or fire, then carries every player's health, armour, weapons and ammunition into the next. A player who dies presses use to start the level again from scratch. After the episode's last level the game is over.

Summary

Functions

The level that follows level, by a normal or a secret exit, or nil at an episode's end.

The sector point is in, in the current level.

Functions

next_level(arg, exit)

@spec next_level(String.t(), :normal | :secret) :: String.t() | nil

The level that follows level, by a normal or a secret exit, or nil at an episode's end.

sector_at(state, point)

@spec sector_at(map(), {number(), number()}) :: non_neg_integer()

The sector point is in, in the current level.