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

@fusiondevstudio/dinosaur-sdk

v0.1.0

Published

The platform contract for building games on Dinosaur — a free, open-source, self-hosted platform for tiny multiplayer party games.

Readme

@fusiondevstudio/dinosaur-sdk

The platform contract for building games on Dinosaur — a free, open-source, self-hosted platform for tiny multiplayer party games.

A Dinosaur game is small: a state machine on the server, a few React screens on the client, and prefixed wire messages. The platform owns everything universal — rooms and invite codes, reconnect grace, host transfer/kick, snapshot rehydration, leaderboards, reactions, voice, feedback — and this package is the only surface a game touches. The platform can refactor freely behind it.

Entry points

| Import | What you get | | --- | --- | | @fusiondevstudio/dinosaur-sdk | Shared protocol types: PlatformSnapshot, PublicPlayer, LeaderboardEntry, GameResultRow, platform constants | | @fusiondevstudio/dinosaur-sdk/server | BaseGameEngine, GameModule, PlatformEngineDeps, broadcast helpers, Player | | @fusiondevstudio/dinosaur-sdk/client | createGameClient, usePlatformStore, send, feedback + sounds, shared hooks, cross-game UI primitives (PlayerRoster, Leaderboard, JoinQR, …) |

A game in three pieces

Server — extend the engine base and expose a module:

import { BaseGameEngine, type GameModule, type InboundMessage } from "@fusiondevstudio/dinosaur-sdk/server";

class TapRaceEngine extends BaseGameEngine<TapRaceGameState> {
  protected buildGameState(forPlayerId: string): TapRaceGameState { /* … */ }
  protected handleGameMessage(playerId: string, msg: InboundMessage): void { /* … */ }
}

export const tapRaceModule: GameModule = {
  id: "tap-race",
  displayName: "Tap Race",
  describe: () => ["tap-race: ready"],
  createEngine: (deps) => new TapRaceEngine("tap-race", deps.leaderboard),
};

Client — a zustand store with applyGameState + reset, wrapped by the factory that enforces the platform's reconnect contract:

import { createGameClient } from "@fusiondevstudio/dinosaur-sdk/client";

export const tapRaceClient = createGameClient<TapRaceGameState>({
  id: "tap-race",
  displayName: "Tap Race",
  GameView,
  store: useTapRaceStore,
  handleServerMessage,
});

Wire messages — always prefixed (tr:*), sent with send() from @fusiondevstudio/dinosaur-sdk/client; durable state always travels on the snapshot, never in ad-hoc messages, so reconnects rehydrate for free.

The contract that matters

The server's snapshot is the single source of truth. On every welcome and state:sync the platform hands your game its slice via applyGameState; after that call returns, your UI must reflect the snapshot exactly. The createGameClient factory makes this structurally hard to get wrong (it requires onSnapshot/onReset to be symmetric).

Building a full game

Start from the platform repo's building-games guide, or scaffold a complete runnable game with the CLI:

dinosaur new-game tap-race --name "Tap Race"
dinosaur dev --games .

Server-side games are typed against Node and ws; have @types/node in your devDependencies (ws types ship with the SDK).

License

MIT