@anysync/game-sdk
v1.0.0
Published
The TinyPlay game SDK: the single import surface for game developers. Re-exports the engine + networking and adds the game contract (defineGame, validateGame) and TypeScript types.
Maintainers
Readme
@anysync/game-sdk — the game developer's single import
Everything a TinyPlay game needs, from one package. Re-exports the engine and
networking, and adds the contract: defineGame, validateGame, the message
shape, and TypeScript types (Game, GameChannel, GameMeta).
import { defineGame, makeCanvas, loop, addButtons } from "@anysync/game-sdk";
export default defineGame({
meta: { id: "my-game", title: "My Game", emoji: "🎮", control: "Buttons", group: "A" },
present: (host, ch) => { /* TV output; ch.on(...) */ return () => {}; },
remote: (host, ch) => { /* phone control; ch.send(...) */ return () => {}; },
});validateGame(def) returns { ok, errors, warnings } so the platform can vet a
third-party package before accepting it. See packages/games/DEVELOPING.md for
the full guide, and the developer portal (apps/developer) for live examples
and an interactive control storybook.
