========================================================================
 Jedi Knight Level

 P21.GOB

 Tetris in a class cog on ONE THING. Walk up to a pillar, press Use,
 and a 10x20 well builds itself out of 200 cubes in front of it. The
 level supplies two THINGS rows from one template and nothing else --
 no COGS row, no camera, no surfaces, no geometry the game needs.

 [cogfactory / p21-classtetris]

 BUILD 1  --  2026-09-05
 sha256 89cca0eb00e2c85188ab45db97ac3bc7

 This level is not made or distributed by LucasArts
 Entertainment Co.
========================================================================

THIS PACKAGE
------------------------------------------------------------------------
  P21.GOB          the level
  readme.txt       this file
  screenshot.jpg   what it looks like

INSTALLATION
------------------------------------------------------------------------
Drop P21.GOB into the `episode` folder of a Jedi Knight install (the one
that already has JK1.GOB in it) and pick it from the episode list.
Nothing else needs to change: the GOB carries its own level, cogs,
materials and sounds, and reads the stock resource/ for everything else.

On a libretro frontend, point the core at the GOB itself. It needs a
folder beside it holding `resource/` from a real install -- that is
where the retail data lives and none of it is in here.

CONTROLS
------------------------------------------------------------------------
  Walk into either pillar until you are TOUCHING it, then press SPACE.
  The well appears in front of it and the camera cuts to it.

    A / D        move left / right   (tap for one cell, hold to repeat)
    W            rotate clockwise
    LEFT/RIGHT   rotate anticlockwise / clockwise
    S            soft drop      -- locks the moment it touches down
    C            HARD DROP      -- and RESTART after a game over
    G or 1-0     switch weapon: quits
    SPACE        quits (press it again at the same pillar)

  THE THING WORTH TRYING: start a game at one pillar, walk to the other
  WITHOUT quitting, and press SPACE. You get a second, separate board.
  Walk back and the first game is exactly where you left it.

NOTES
------------------------------------------------------------------------
  A CUBE HAS SIX FACES AND TETRIS HAS SEVEN PIECES. A cell's colour is
  which face of its cube points at the camera -- there is no per-thing
  equivalent of SetWallCel in stock Jedi Knight, so orientation is the
  only colour channel a cog has. Six faces means six colours, and L
  shares amber with O. An empty cell is the cube hidden, not a seventh
  face.

  TWO KIOSKS IS THE LIMIT, and it is a number baked into the cog
  rather than a property of the engine. Every thing made from one
  template shares ONE cog instance and therefore ONE heap, so each
  kiosk gets a partition of it; the cog carries two. A third pillar
  would be told there is no room, out loud.

  THE PIECE ORDER IS FIXED, not random. It is a real 7-bag -- every
  piece once per seven -- but the order is baked at 70 pieces long,
  because Jedi Knight's Rand() is never seeded from the level and a
  random game cannot be tested. Both kiosks play the same sequence.

  THE WELL NEEDS ROOM. The cog measures its own sector before it
  builds anything and refuses if the answer is no -- about 1.3 units
  of headroom and enough floor for the camera to back off. Put a
  pillar in a cupboard and it will say so instead of putting the
  camera inside a wall.

  200 cubes per kiosk plus a backdrop and a camera is 202 things, and
  `World things` is a number the LEVEL sets. That is the one thing a
  kiosk dropped into somebody else's level still needs from it.

  No wall kicks, no hold piece, no next-piece preview. Single player:
  the cog is marked NOSYNC, so the board is silent on the wire and is
  one person's game.

WHAT IS IN THE GOB
------------------------------------------------------------------------
        95  episode.jk
      8581  jkl\kiosk.jkl
     47817  cog\p21kiosk.cog
      3971  3do\p21back.3do
      2319  3do\p21cube.3do
      2318  3do\p21kiosk.3do
      2188  mat\p21bez.mat
       652  mat\p21c1.mat
       652  mat\p21c2.mat
       652  mat\p21c3.mat
       652  mat\p21c4.mat
       652  mat\p21c5.mat
       652  mat\p21c6.mat
      2188  mat\p21ceil.mat
      2188  mat\p21floor.mat
      2188  mat\p21kbody.mat
      2188  mat\p21kpan.mat
      2188  mat\p21wall.mat
      2188  mat\p21well.mat
     19888  sound\p21drop.wav
     33118  sound\p21line.wav
     13274  sound\p21lock.wav
      4894  sound\p21move.wav
     48554  sound\p21over.wav
      4894  sound\p21rot.wav
     26504  sound\p21start.wav
     59578  sound\p21tetr.wav

    295033  bytes in 27 entries

CREDITS
------------------------------------------------------------------------
  Generated end to end by tools/cogfactory in the openjkdf2_libretro
  tree -- level, class cog, models and materials.
  The rules, the input map and the debounce are p19's, imported rather
  than copied.
  Sound effects are p19's, generated with ElevenLabs and converted
  with tools/cogfactory/sfxlib.py.
  It stands on p19 (a whole game in a cog), p18 (every input channel a
  level cog can read), p17 (the cog heap, and what FireProjectile
  costs), p14 (why `cog=` goes last) and p12 (one class cog, many
  things).

  The readme format is styled after SM Sith Lord's cog headers,
  because his are the ones everybody read.

========================================================================
