NAME
     doom, gfx - play DOOM on the crystal; view a graphics session

SYNOPSIS
     doom [ -s WxH ] [ -c chan ] [ -d ] [ -n ] [ -m ] [ -r ] [ -t ms ] [
     gfxdir ]
     gfx [options]

DESCRIPTION
     Doom opens a graphics session on the attached crystal and plays the game
     running there.  Nothing of DOOM runs on this deck: the crystal renders
     frames, this end reads them out of a file and writes your keystrokes back
     into another.

     Gfx is the same program without the game.  It opens the session and
     leaves you in the crystal's lobby, from which d starts DOOM anyway.  Use
     it to look at a graphics session for its own sake.

     The window sits in the middle of the screen with the controls printed
     underneath.  Press ?  at any time for a page explaining what is actually
     happening.

OPTIONS
     -s WxH
          Raster size; the default is 320x240, which is DOOM's own 320x200 at
          the 4:3 stretch a CRT gave it.  Larger costs proportionally more
          bandwidth per frame; the size is clamped to the panel.

     -c chan
          Pixel channel: r5g6b5 (colour, the default), k8 (256 greys), or k1
          (one bit).  Without this flag the client falls back to k8 if the
          crystal will not do colour; with it, the request is final.

     -d   Ask the crystal to dither.  Pairs with -c k1, where a flat threshold
          turns continuous tone into mud.

     -r   Raw frames.  By default the client asks for compressed ones, which
          are about a third the size on gameplay; this turns that off.

     -n   Do not start the game -- stay in the lobby.  Invoking the command as
          gfx does the same thing.

     -m   Start with the pointer on.  See THE POINTER below.

     -t ms
          How often the e-paper panel may redraw; 1200 by default.  Frames
          that arrive between refreshes are dropped, which costs nothing: the
          stream is a projection of the server's raster rather than a log to
          replay, so a late frame is simply a fresher one.  Ignored where the
          display is not e-paper.

CONTROLS
     w a s d
          Move and turn.  The arrow keys do the same.

     f    Fire.

     space
          Open doors and work switches.

     enter
          Choose, in menus.

     esc  The DOOM menu.

     ?    How this works.

     ~    Leave the game, back to the lobby.

     ctrl-]
          Leave the session, back to the shell.

EXAMPLES
     Connect and play:

          bbs/connect
          doom

     Over a slow link, ask for something a slow link can carry:

          doom -s 160x120 -c k1 -d

     The black-and-white Macintosh adventures in the Playhouse are already one
     bit deep, so ask for one bit and no dithering -- anything else only
     guesses at pixels the game already decided:

          gfx -m -s 640x420 -c k1

FILES
     /n/bbs/gfx
          The crystal's graphics device.  Give a different directory as gfxdir
          to use another one.

     /n/bbs/gfx/N/ctl
          Session control: size, channel, dithering, compression.

     /n/bbs/gfx/N/draw
          The frames, read as a stream of drawing operations.

     /n/bbs/gfx/N/kbd
          Keystrokes, written as runes.

     /n/bbs/gfx/N/mouse
          Pointer position and buttons, written as text.  Absent on older
          crystals, in which case the pointer is simply unavailable.

SEE ALSO
     bbs(1), aether(3)

NOTES
     The session lives exactly as long as the file that created it stays open.
     Close it and the crystal reclaims everything -- the Plan 9 habit of making
     a resource's lifetime a file's lifetime, which is why there is no way to
     leak a session by crashing.

     Frame rate is a function of how much of a frame fits in one read, so a
     faster link and a smaller window both help more than they look like they
     should.

KEYS AND HOLDING
     The keyboard file carries Plan 9 keyboard runes in tagged messages: a set
     of keys now held, a set still held after a release, or runes simply
     typed.  Reporting the whole held set is what lets forward and strafe and
     fire be held together, which one press at a time cannot express.

     The deck's console delivers characters rather than key events, so a
     release is inferred from autorepeat stopping: a key is held until it goes
     quiet for about a sixth of a second.

THE POINTER
     Some of what the crystal serves is played with a mouse rather than a menu
     -- the Playhouse adventures above all, where clicking on things is the
     whole game.  The deck has no mouse, so the arrow keys become one.

     Ctrl-p turns the pointer on and off; -m starts with it on.  While it is
     on, the arrows move the cursor (accelerating as you hold one, so crossing
     the window does not take all afternoon), space clicks, and tab
     right-clicks.  Everything else still reaches the game, so a game that
     wants typing as well as clicking mostly works without touching the
     switch; turn the pointer off when you need space itself.

     The cursor is drawn by the crystal, not here -- this end only says where
     it is.  Coordinates are in the session raster, so what the game sees is
     not affected by where the window happens to sit on the panel.

     F5 opens ScummVM's own menu, which is where saving and loading live.

NOTES ON E-PAPER
     It plays on the e-paper decks.  The defaults change to suit the panel --
     one bit per pixel, dithered by the server, redrawn about once a second --
     and what you get is DOOM in ink, arriving at the pace the panel can
     honestly manage.  It is not a fast game there.  It is a strangely good
     one.

     -t sets the pace; the window is centred and its size is clamped to the
     panel.  A smaller raster (-s 160x120) refreshes noticeably quicker.

FRST Computer                                                          DOOM(6)
