Log inGet started
Package

ConsoleStation.component

Newest version

This package holds more than this page lists. See all of its files in its world.

README.md

ConsoleStation

A shared television console: any emulator core in the world (NES, CHIP-8, Neo Geo, ...) running on one screen that the whole room sees, with two controllers. Put it on an entity at the screen's centre, facing out of the screen (+Z), whose screen mesh draws the material bound to texGuid.

  • Choosing a game. Near it with empty hands, Interact (E / pad west / touch) opens the cartridge library (stations.cartlib): every built-in cartridge and every cartridge anyone in the session has uploaded, for the consoles in consoles, plus "Upload from your computer".
  • Where it runs. On the peer that holds the cartridge's bytes (the runner): the uploader, or the one who picked a built-in cart. That peer emulates at full speed, hears the sound, and streams the picture to everyone else (stations.framecodec delta frames, streamHz a second within streamBudget bytes a second). It restates what is inserted every few seconds, so a late joiner sees it too.
  • Two players. A PadControl controller sends its buttons here as one word (bit 0-3 right, left, up, down; 4-7 A, B, C, D; 8 Start; 9 Select/Coin). The runner applies player 1 and 2 to the core (NES pads, CHIP-8 keypad, Neo Geo setPad).

Methods: padInput(slot, word) (from a controller on this peer), insert(entry), eject(), cart(), isRunner(). Fields: consoles, texGuid, streamHz, streamBudget, volume, promptRange, seatOffset (where a player's view sits while holding a controller, in this entity's frame), status.

  • The screen's light. While a picture runs, the picture's drawn colour lights the room on every peer: a shadowed spot out of the glass (glowIntensity, glowRange, glowShadows), a small point on the tube, and a broad shadowless fill (fillIntensity, fillBack metres behind the glass so its falloff from set to seats is gentle, fillAngle, fillPitch down toward the floor and seats). All go dark on eject.