Modules
ExPilot's arenas on Cauldron2D.Arenas: a map each, its world an ExPilot.Game,
its robots (ExPilot.Robot) and its ledger recorder seated beside it.
Every picture ExPilot draws, as a Cauldron2D.Atlas named :ex_pilot.
Treasures and the balls in them, for capture the flag.
What every client — the terminal's, the browser's, the desktop's — needs from ExPilot,
as Cauldron2D.Client.Game asks for it: the title, the keys, the arenas, how a view
is drawn, and the sound and music.
The terminal client's leaders page: today, this week and all time side by side, the
top ten by kills with their kills a death and rounds won, from ExPilot.Ledger.
The "No sound?" page of a served ssh session: the player's sound port on the server, the player program to run on their machine for each operating system, and the ssh line whose reverse tunnel carries the sound.
Challenges between two pilots: each is an arena of its own on a map both know, no
robots, the two of them the only ones who may fly (anyone may watch), the first to a
number of kills the winner; the arena closes ten seconds after. The challenged may
decline and the challenger withdraw (cancel/2), and a duel nobody has flown for ten
minutes expires; either way the arena goes.
A challenge sent to another ExPilot server over its API (POST <url>/duel), and a
duel there declined or withdrawn (POST <url>/duel/cancel).
The rules of ExPilot as one pure value, run by Cauldron2D.World.
What a ship's items do when their keys are pressed or held, and while their effects last.
What everything in the arena is: the things on the map, the weapons, and every item with the key that uses it, in sections of entries with the art the atlas draws them with. The terminal shows it from the title and the lobby, the browser on its guide page.
XPilot's items: what they are, where they appear, and what picking one up does.
ExPilot's results in Cauldron2D.Ledger, kept at
$XDG_DATA_HOME/expilot/ledger.dets beside the accounts, with the metrics its boards
rank by: kills, kills a death, rounds won, the best streak of kills without dying,
the longest contact (seconds alive with an enemy within thirty tiles) and laps.
A classic XPilot map read for play: the block legend, the features on it, and the options ExPilot honours.
The kinds of arena ExPilot.Game.mode/1 tells apart, in words and in colour, for every
client's lobby.
ExPilot's music: pieces written in Strudel, one per mood and kind of arena, each in
four layers — :drums, :bass, :pad, :lead — for Cauldron2D.Audio.Music.
The pieces for a ctf arena, as ExPilot.Music lists them: {name, bpm, %{section => {bars, layers}}}.
The recorded instruments the pieces play beside the synthesised ones, registered with
TuningFork.Sfz when the application starts: FreePats' fingered and picked electric
bass and Karoryfer Samples' meatbass, all CC0, fetched from where they are published.
The pieces for a race arena, as ExPilot.Music lists them: {name, bpm, %{section => {bars, layers}}}.
Helpers for writing a piece's Strudel chains.
The songs a static stage loops, one a kind of arena, as ExPilot.Music lists them:
{name, bpm, %{song: {bars, layers}}}. Each is a piece of the concert repertoire
played from its score — a MIDI engraving under priv/scores, read at compile time
through ExPilot.Music.Score.part/2 — on the Salamander grand (piano, a recorded
Yamaha C5, CC BY 3.0) with a recorded bass (ExPilot.Music.Instruments' fingerbass
and pickbass from FreePats, meatbass, a plucked double bass, from Karoryfer Samples,
all CC0), a drum kit and a doubling instrument arranged under it, in four layers,
written to be heard round and round: the last bar leads back to the first and nothing
changes with the fight.
The pieces for a team arena, as ExPilot.Music lists them: {name, bpm, %{section => {bars, layers}}}.
Race mode: the map's checkpoints A–Z taken in order, a lap at a time.
XPilot's radar on Cauldron2D.Minimap: the whole arena in a few rows of braille,
walls in blue, bases grey, the player's ship yellow, teammates blue and enemies red.
With radar.players? false in the view (the map's playersonradar), only the
player's own ship is marked.
A robot's brain for Cauldron2D.Robot: a robot joins a world as {:robot, n} and
flies by its view, deciding every few frames here.
Serve ExPilot: its maps as arenas, over ssh and to browsers, through
Cauldron2D.Drafter.Server.
One player's ship: its body, fuel, shield, lives and score, and what it is doing.
XPilot ship shapes, as players wrote them.
The sound each game event makes.
Targets: the ! tiles a team defends. Each belongs to the team of the nearest base,
takes three hits from anything but its own team, and comes back a minute after it is
destroyed. Destroying one scores for the shooter's team.
ExPilot in a terminal, with the desktop's flow: a title of its own, play here, connect
to a node or a server, host a server, the leaders — the arenas, settings and play
themselves being Cauldron2D.Drafter.Client started at its lobby and driven from
here.
What a ship can throw besides its cannon shot: torpedoes, smart and heat missiles, mines, and the laser.
ExPilot's own API beside Cauldron2D.Net.Api (which serves the token, the arenas,
the stats and the leaders under /api): the duels (GET /api/duels; POST /api/duel with a token, to, arena and first_to to challenge someone; POST /api/duel/cancel with a token and the duel's id to decline or withdraw it).
A browser player in an ExPilot arena, its sound at 44 100 Hz stereo unless the browser asks otherwise (a phone asks for 22 050 Hz mono); see Cauldron2D.Net.Channel.
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.
Who a browser player is: login against the server's Drafter.Accounts, the signed
token a page hands its socket, and the sound levels kept in the account.
The pieces ExPilot's pages share: the shell with its top bar (a tab bar along the bottom on a phone or a tablet, where the top bar is hidden), the badge naming an arena's kind, and a sprite cut from the sheet.
The HTTP side of an ExPilot server: the pages, the player socket, the sprite sheet
and the scripts, on the port ExPilot.Server.start/1 is given as :http.
The guide: what everything in the arena is, with its picture.
The boards: the pilots of today, this week and all time, by kills, kills a death, rounds
won, longest streak, longest contact and laps, over every arena or one of them, from
ExPilot.Ledger.
The arenas, who is in them, the way in, and the duels: a challenge to another pilot on an arena, first to a number of kills.
Log in, or make an account, against the server's accounts.
Turns a login token into the browser session cookie, and clears it on logout.
The sound levels of this kind of client — the browser, or a phone or tablet
(:touch, told by the page) — kept in the account under their own key, and the
nickname every client plays under.
Serves the sprite sheet the browser draws the arena from.
The player socket: a browser connects with the token its page was given at login and
the kind of client it is (web or touch), and its channels carry the player's name
and that kind's sound levels.
ExPilot in a window, played with the keys or the mouse: the title, the lobby, the
arena, the summary, the settings, a connect screen and a serve screen, every one
drawn on the same canvas (ExPilot.Wx.Screens on Cauldron2D.Wx.Text), the arena on
Cauldron2D.Wx.View.
The desktop's keys: wx key codes and mouse buttons to ExPilot's actions, the same bindings the browser has.
What the desktop's screens look like, as items Cauldron2D.Wx.Text draws: the title,
the connect form, the lobby, the settings, the leaders, the summary and the serve form
(the start or stop first, the settings under it), from the window's state.
Mix Tasks
Open the desktop client: a wx window that joins a server by URL, a node, or the arenas this app serves itself from its Server page.
Open the ledger at $XDG_DATA_HOME/expilot/ledger.dets and forget the results of every
name matching a pattern, * standing for any run of characters. The load tool's
accounts are load_1, load_2 and so on.
Play the sound of an ExPilot session served elsewhere through this machine's speaker:
run it here, then connect with ssh -R <your port>:127.0.0.1:4713 ….
Run Cauldron2D.Net.Load against an ExPilot server started elsewhere
(mix ex_pilot.serve in another terminal, or another machine), with the players
holding ExPilot's own actions: a report every few seconds, a summary at the end, and
every report and the summary written as JSON lines to a file as the run goes.
Enter ends the run early with the summary of what was measured; Ctrl-C kills
the run, and the file has every report up to it.
Fetch the 131 classic XPilot maps from SourceForge into priv/maps.
Offer every map under priv/maps (or --maps) as an arena and run the client in this
terminal, with sound through this machine's speaker. An arena's world starts when it is
joined.
Start the ExPilot ssh server and keep it running.
Run ExPilot.Terminal: the desktop's flow in a terminal — play the arenas this
program carries, connect to a node or a server, host a server for others, see the
leaders.