All work

artubeplate & stakeplate

From a math folder to a playable slot

Game cores for two remote game servers. Point the CLI at a math folder and get a running game with HUD, round state machine, reconnects, free rounds and a local mock RGS. A game supplies four things; the core owns everything else.

Source npm
  • From math to a playable game

    Point the CLI at a math export and get a running slot with HUD, round flow, reconnects and free rounds.

  • Fix once, every game gets it

    Platform behaviour lives in one versioned core. A reconnect fix ships to all games with a version bump.

  • Math moves between platforms

    The CLI converts Stake Engine math for the Artube RGS, so one game design can launch on both.

The goal

The line in stakeplate's architecture doc is "about a thousand different games on one architecture". A bug in balance formatting or reconnect handling should be fixed once, in a versioned package, not in every game that shipped with it.

Both kits follow the same shape. A game provides:

  1. a config,
  2. interpretBook, which turns a math result into presentation steps,
  3. a Scene, built on pixi-reels,
  4. its present phases.

The core runs the rest: boot order, authentication, currency and jurisdiction, the round state machine (Idle, Spin, Present, Settle), the HUD from open-slot-ui, audio via zvuk, particles via Pylinka, free rounds, max win, autoplay, turbo, buy features and replay.

stakeplate (July 2026)

The Stake Engine version: 52 commits and twelve releases in eighteen days. One file talks to the RGS and returns raw protocol shapes; settling the round is the engine's job. It keeps API money units (×10⁶) and book units strictly apart.

artubeplate (October 2026)

The same idea for the Artube RGS, plus a math CLI that validates, packs, and converts a Stake publish_files folder, so a game's math can move between platforms. npm create artubeplate gives you a game that runs against a local mock RGS that follows the platform's rules, or against the real hub when an operator opens it with a session id.

Reconnects are layered, because that's where real sessions die:

  • The first connect retries five times over ~4 s (SignalR's automatic reconnect only covers a connection that was already up).
  • After the platform's five reconnect attempts it keeps retrying in the background, and immediately when the browser reports it's back online.
  • 429 backs off and retries the same call; 500 gets at most two retries for session and balance calls.
  • When the server announces a newer connection for the session, the client stops itself so a dead session can't come back to life.

Lineage

pixiplate (2022, a Pixi boilerplate) to slotplate (2024–26, npm create slotplate, a template with a pure domain layer and FSM phases), then open-slot-ui, stakeplate and artubeplate.