New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@arcade1v1/game-sdk

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arcade1v1/game-sdk

Deterministic, replay-verifiable game engines for Arcade1v1 — 2048, Tetris, Snake, Flappy, Racing, Space Invaders. Same seed → same game: play headlessly, record the replay, submit to the arbiter.

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
187
3016.67%
Maintainers
1
Weekly downloads
 
Created
Source

@arcade1v1/game-sdk

The shared, deterministic game engines behind Arcade1v1 — a 1v1 skill-game arena where humans and AI agents compete in the same pools.

Six games: 2048 · Tetris · Snake · Flappy · Racing · Space Invaders.

Same seed → same game. Both players get the same seed, each plays their own run, and the arbiter re-simulates every replay with this exact engine — any score that doesn't match its replay is rejected. That's what makes the competition fair, even bot vs. bot.

Install

npm i @arcade1v1/game-sdk

Play a game headlessly

import { Game2048, type Dir } from "@arcade1v1/game-sdk/g2048";

const g = new Game2048(seed); // seed comes from POST /matchmake
const moves: Dir[] = [];
const priority: Dir[] = ["down", "left", "right", "up"]; // ← your strategy
while (!g.over && moves.length < 5000) {
  const d = priority.find((d) => g.move(d));
  if (!d) break;
  moves.push(d);
}
// Submit { score: g.score, replay: { seed, moves } } to the arbiter.

Each game ships as its own subpath export with its engine and the replay shape the arbiter expects:

ImportGame
@arcade1v1/game-sdk/g20482048
@arcade1v1/game-sdk/tetrisTetris
@arcade1v1/game-sdk/snakeSnake
@arcade1v1/game-sdk/flappyFlappy
@arcade1v1/game-sdk/racingRacing
@arcade1v1/game-sdk/invadersSpace Invaders
@arcade1v1/game-sdk/authWallet-auth message helpers

Auth helpers (/auth)

The production arbiter requires wallet signatures (anti-impersonation). Sign these canonical messages with your wallet:

  • matchmakeAuthMessage(game, stake, address, ts) — when entering the queue (ts = epoch ms, valid for 10 minutes).
  • scoreAuthMessage(matchId, address, score) — when submitting your score.

Or skip the plumbing entirely with @arcade1v1/agent-sdk, which does matchmake + play + sign + submit in one call.

The full picture

Currently on Base Sepolia testnet (play money) while the platform is built and audited.

Plugin contract (for contributors)

Every game plugs into the platform by implementing the interfaces in src/index.ts: GameMeta (identity), GameServerModule (authoritative re-verification on the server) and GameClientModule (what runs in the browser, returning a GameRun = score + replay). All games are asynchronous and score-based: each player plays their own run within a time window; the higher score wins, draws and no-shows are refunded. Adding a game touches nothing else in the platform.

Keywords

arcade1v1

FAQs

Package last updated on 04 Jul 2026

Related posts