ElixirQuake.Game (elixir_quake v0.1.0)

Copy Markdown View Source

Quake as a Cauldron2D.Game, single player: the held actions become Quake commands, the server runs a frame each tick, and what it reports (its events; the player's packet is taken and left unread each frame) becomes the screen's effects and sounds.

Cauldron2D.World.start_link(game: ElixirQuake.Game, game_opts: [map: "start", skill: 1], hz: 60)

Options: :map (default "start", the episode and skill hub) and :skill (0 to 3, default 1). Game files must have been loaded with ElixirQuake.Assets.load/1.

The actions read are :forward, :back, :strafe_left, :strafe_right, :turn_left, :turn_right, :look_up, :look_down, :center_view, :run, :fire, :jump, :next_weapon, :prev_weapon and :weapon_1 to :weapon_8; a stick's strength scales moving, turning and looking. The input's :options with always_run: true runs without the run key; a :request of {n, :new_game} starts a new game on start, once for each n. The program's level changes, restarts after death and the end of an episode are followed.