def-game
v6.1.0
Published
Pure game definitions, a simulator, and a Cloudflare Durable Object runtime for turn-based games
Readme
def-game
ゲームの状態遷移をCommandに集約し、外部処理をEffectで接続するTypeScriptライブラリです。 共通runtimeが部屋の保存・WebSocket・Alarmを扱い、ゲームルールと認証・外部サービスとの接続はアプリ側で定義します。
Getting Started
Node.js 22以降が必要です。v6.1.0の利用手順です。
npx [email protected] init-worker --directory my-game --name my-game
cd my-game
npm install
npm run devhttp://127.0.0.1:8787を開いてください。
実装前に設計思想を読み、接続方法はruntime API・初期生成の使い方を参照してください。
