ExPilot.Web.ArenaLive (ExPilot v0.1.0)

Copy Markdown View Source

The arena: the canvas the browser draws the world on, the hud beside it, and the round's end. On a coarse pointer (a phone or a tablet; ?touch=1 or ?touch=0 forces it, kept in the browser) the page is the game alone — no top bar, no key hints, nothing to scroll: the canvas fills the screen, a thumbstick steers and, pushed past the ring at half its travel, thrusts — the harder the push, the more thrust (strength in the input, from a third of full at the ring); buttons fire, shield, fire a missile and thrust (next ship when watching); the fuel, score and status ride over the world; ≡ opens the rest of the hud over it, −/+ and a pinch zoom the view out to the whole arena and back, ⇄ swaps the stick and the buttons between hands (kept in the browser), ♪ switches the music off and on (kept in the browser, the effects stay), ⤢ goes full screen and ✕ leaves for the arenas. The sound comes as 22 050 Hz mono there, a quarter of the desktop's bytes. With a keyboard +, − and the wheel zoom and 0 puts the view back, and ♪ in the bar switches the music; watching, the arrows or a drag (the mouse, a finger) pan the view, the wheel and a pinch zoom about the pointer or the fingers, and 0 recentres it.

Summary

Functions

The browser's keys, by KeyboardEvent.code, and the mouse buttons, to the game's actions.

Functions

keymap()

@spec keymap() :: map()

The browser's keys, by KeyboardEvent.code, and the mouse buttons, to the game's actions.