npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bordiko/sdk

v0.4.0

Published

Author Bordiko board games: defineGame, the deterministic engine, the hybrid board schema, and the sandboxed custom-UI client. Compile to WebAssembly and publish to the marketplace.

Downloads

837

Readme

@bordiko/sdk

Everything you need to author a Bordiko board game: defineGame, the deterministic engine, the hybrid board schema, and the sandboxed custom-UI client (@bordiko/sdk/ui). Pairs with @bordiko/cli to scaffold, play in a local sandbox, compile to WebAssembly, and publish — all from your own repo.

Now (Phase 1)

  • defineGame(def) — validates a game definition (kebab-case id, player range, non-empty moves, setup present, meta.displayName) and brands it.
  • BoardSchema — declarative boards: grid | hex | network | tableau | custom.
  • Re-exports everything from @bordiko/engine (createMatch, applyMove, applyTick, getPlayerView, replay, INVALID_MOVE, TickContext, types, …).

Real-time (action) games

Give your definition a tick(G, dt, ctx) and the host drives a fixed-rate clock, so the world advances even without input — turn-based games just omit it.

export default defineGame({
  name: "sumo", minPlayers: 2, maxPlayers: 2,
  setup: () => ({ /* disks, velocities … */ }),
  initialActive: (G) => G.disks.map((d) => d.id), // all seats act at once
  moves: { input: (G, p, ctx) => { /* record held thrust into G only */ } },
  tick: (G, dt) => { /* integrate physics by the FIXED step dt (ms) */ },
});

Declare it in the manifest: "realtime": { "tick": true, "tickRate": 15 } (≤ 30). Keep tick deterministic (fixed dt, no wall clock, ctx.random only). Your UI subscribes with connectBordiko().onState(...), sends move("input", …), and interpolates with requestAnimationFrame. @bordiko/sdk/ui also exposes fullscreen() (asks the host to fullscreen the game stage). See games/sumo.

Debugging

The sandbox has no host-visible console. Open a game with ?debug (or press Ctrl+Shift+D) for a developer panel that shows the live state + legal moves and the sandbox's forwarded logs. Uncaught errors, console.error/console.warn are forwarded automatically; use connectBordiko().debug(...) for intentional output.

import { defineGame } from "@bordiko/sdk";

export default defineGame({
  name: "my-game", minPlayers: 2, maxPlayers: 2,
  setup: () => ({ /* ... */ }),
  moves: { /* ... */ },
  meta: { displayName: "My Game", board: { kind: "grid", rows: 3, cols: 3 } },
});

The workflow (with @bordiko/cli)

npm create @bordiko/game my-game    # scaffold a project
cd my-game && npm install
npm run dev             # local sandbox: every seat, bots, hot-reload, custom-UI preview
npm test               # plain Node, no build
npm run build           # compile to WebAssembly (auto-downloads Javy, no Docker)
npm run publish:game    # ship to the marketplace

Full guide: https://bordiko.com/developers

Run the SDK tests: npm test.