Skip to content

Phase 0 — Proposal

Status: delivered, awaiting owner approval. Date: 2026-11-27.

This is the entry point. Detail lives in the linked docs and ADRs.

Deliverable Where
Tech stack with alternatives and trade-offs §1 below, ADRs 0002–0015
Hosting comparison, cost estimates, recommendation hosting.md, ADR 0011
Architecture diagrams (Mermaid) architecture.md
Monorepo layout monorepo-layout.md
Schema drafts: game manifest, scene, level, content pack schemas/ (validated by spikes/schema-validation)
Roadmap refinements roadmap.md
Key risks risks.md
Name ideas §4 below
ADRs adr/

The shape of the design: we own the parts that make it AI-friendly and consistent (loop, scenes, ECS, schemas, input action maps, arcade physics, the data formats, the AI tools) and wrap proven libraries for the heavy lifting (PixiJS, Three.js, Rapier, Hono, Postgres, Better Auth, the AI SDK) behind our own interfaces.

Area Recommendation Main alternatives Why
Language TypeScript, strict, ESM JS + JSDoc Types are how an AI (and a developer) discovers and uses the API correctly
Monorepo pnpm workspaces + Turborepo + Changesets Nx, moonrepo, Bun Simple, fast, strict deps; little config for an AI to get wrong
Build / dev server Vite (games, HMR), tsdown (libraries) Webpack, Rollup, esbuild directly Fast HMR and tree-shakeable ESM output
Lint / format Biome ESLint + Prettier One fast tool; fallback to typescript-eslint for specific rules
Tests Vitest (unit), Playwright (e2e, headless runs, screenshots) Jest, Cypress Same pipeline as Vite; Playwright doubles as the MCP screenshot/runner engine
Schemas Zod → JSON Schema 2020-12 TypeBox, hand-written JSON Schema One schema library across runtime, API, MCP and AI SDK
ECS / core Own small ECS + fixed-step loop + scene stack bitECS, miniplex, Phaser-style objects Components must be schema-typed and serializable for AI, saves, inspector, netcode
2D rendering PixiJS behind Renderer2D Phaser, hand-written WebGL, Three.js 2D Fast batched WebGL without adopting a whole engine
3D rendering Three.js behind render-3d (provisional) Babylon.js, PlayCanvas A renderer, not an engine; well known to AI models
Physics Own arcade physics (P1); Rapier 2D/3D (P5) Matter.js, Planck, Jolt, cannon-es Arcade feel needs custom code; Rapier is fast, deterministic, 2D + 3D
Audio Own thin Web Audio layer (buses, crossfades) Howler.js Small; buses and crossfades are a few hundred lines; spatial audio later via Web Audio panners
Input Own (keyboard, mouse, Gamepad API, action maps) — No library adds much; remapping is part of our data model
Backend API Hono + @hono/zod-openapi on Node Fastify, NestJS, tRPC Typed routes + OpenAPI from Zod; also runs on Lambda/Workers if needed
Database PostgreSQL + Drizzle Prisma, Kysely, MongoDB Relational integrity for money and lineage; jsonb for documents
Jobs pg-boss on Postgres SQS, BullMQ + Redis No extra service until needed
Object storage S3 API (local S3-compatible container) — Same code locally and on AWS/R2
Web app React + React Router v7 (framework mode), Monaco, Tailwind Next.js, SvelteKit, TanStack Start SSR for catalog; plain Node container; React is best known to AI
Auth Better Auth (self-hosted, Postgres) Cognito, Clerk, Auth0, Supabase Auth Runs locally, no per-MAU fees, users stay in our DB
AI: docs TypeDoc → markdown → llms.txt / llms-full.txt + tested recipes Hand-written docs Generated from source so it can’t drift
AI: tools MCP server (official TS SDK), stdio + Streamable HTTP Custom plugin API The standard most AI clients support
AI: providers Own AiProvider interface over Vercel AI SDK; BYOK Vendor SDKs directly, LangChain.js Swap Claude / OpenAI / local models; one place to meter usage later
Multiplayer WebSocket, server-authoritative (evaluate Colyseus); datagrams later WebRTC P2P, both now Works everywhere, authoritative, moderatable — see ADR 0014
Hosting Docker Compose → ECS Fargate + RDS + S3 + CloudFront, AWS CDK AWS serverless, Supabase + Cloudflare Best local parity and fit for Chromium/build/WebSocket workloads — see hosting.md

Performance budget (enforced from Phase 1): 60 fps on a mid-range laptop for the sample games; initial targets (gzip) — core ≤ 15 KB, physics-arcade ≤ 10 KB, input ≤ 5 KB, audio ≤ 5 KB; full side-scroller runtime including PixiJS ≤ 250 KB. Measured with size-limit and recorded in docs/perf.md.

Recommended: containers — the images docker compose up runs locally are the images ECS Fargate runs in production; only environment config changes. Estimated infrastructure cost (±50%):

Monthly players AWS serverless Supabase + Cloudflare Containers on AWS (recommended)
100 $5–25 $0–30 $50–70 (or ~$10–20 on a single VM for staging)
10,000 $60–150 $40–100 $100–180
1,000,000 $2,000–3,000 $800–1,500 $1,600–2,500 (≈ $900–1,600 with cheap-egress asset hosting)

Assumptions and line items: hosting.md. Bandwidth is the dominant cost at scale, so the framework’s bundle budget is also a cost control.

Draft JSON Schemas for the game manifest, scene, level (tilemap) and content pack, with shared definitions and worked examples (a sample-platformer manifest, its first scene and level, and a community pack). Strict Ajv compiles all of them; the examples pass; 9 unsafe or malformed cases are rejected (a scripts section in a pack, JavaScript media types, ../ path traversal, absolute URLs, a paid pack without a price, turning off pack approval, a bogus input binding, a spawn without a prefab, an unknown rule action). See schemas/README.md.

Availability of domains, npm scopes and trademarks has not been checked — I’d do that for your shortlist.

  1. Kiln — where ideas get fired into games. Short, ownable verb-ish noun.
  2. Playloom — weaving games together; hints at community threads/remixes.
  3. Questsmith — a smithy for quests; friendly to non-coders.
  4. Spritewright — the craft of making games; strong for a framework name.
  5. Makeworld — plain-language promise: make a world.
  6. Tinkertide — playful, creative, community wave.
  7. Gameweave — remix and lineage as a woven fabric.
  8. Dreamkit — “describe your dream game” onboarding story.
  9. Pocketverse — small worlds you can carry and share; mobile-friendly.
  10. Arcwright — arc (story, jump arc, arcade) + wright (maker).

One option is a two-name split, e.g. platform “Kiln” and framework “Kiln Engine”/@kiln/*, which keeps SDK imports short.

Round 2 (2026-11-27), with the later roadmap in mind (licensed engine, shared currency, multiplayer). Each comes with a possible name for the shared credits. Availability not checked.

  1. Kindling: small sparks that catch into games. Credits: embers.
  2. Playmint: games freshly minted. Credits: mints.
  3. Hexhaven: a safe harbour for many small worlds. Credits: hexes.
  4. Joyforge: an engine and a workshop in one word. Credits: ingots.
  5. Lanternworks: lights up ideas; “works” suits an engine you license. Credits: wicks.
  6. Gamekin: games plus kin (the community, multiplayer). Credits: kinbits.
  1. Approve the stack and ADRs? In particular the bigger calls: PixiJS (not Phaser), our own ECS and arcade physics, Hono + Postgres + Drizzle, React Router (not Next.js), Better Auth (not Cognito/Clerk), containers on AWS.
  2. Framework licence. Open source (MIT/Apache-2.0) helps adoption and AI familiarity; source-available or proprietary protects the platform. I’d suggest MIT for the framework packages and keeping the platform apps private — your call, and it changes the repo setup (public vs. private, or two repos).
  3. Roadmap changes in roadmap.md: splitting phases 1, 3 and 7; moving minimum moderation/legal and basic touch controls into Phase 3; the AI eval suite in Phase 2. OK?
  4. Optional private staging deployment at the end of Phase 3 (single VM, password-protected, not production) — yes or no?
  5. Age policy: accounts 13+ (players without accounts can play anonymously)? This shapes auth and data collection.
  6. Sample game art/audio: CC0 asset packs (e.g. pixel-art packs with permissive licences) acceptable, or do you want original placeholder art only?
  7. Name: pick a shortlist and I’ll check domains/npm.

1a — Foundation (gate 1a)

  1. Tooling: pnpm workspace, Turborepo, Biome, tsconfig.base.json, Vitest, Playwright, size-limit, TypeDoc, local CI script; flip approved ADRs to Accepted; update CLAUDE.md with real commands.
  2. schema: Zod definitions for manifest/scene/level/prefab, JSON Schema generation (replacing the drafts), validators with semantic checks, migration scaffold.
  3. core: fixed-step loop with interpolation, scene stack, ECS (components, queries, systems, phases), typed event bus, asset loader with caching and bundles, SaveStore (localStorage/IndexedDB), seeded RNG.
  4. input: keyboard, mouse, Gamepad API, action maps from the manifest, remapping and persistence.
  5. render-2d: PixiJS adapter — sprites, sprite-sheet animation, chunked tilemap layers, parallax, particles; stub renderer.
  6. physics-arcade, camera (follow, dead zone, bounds, shake), audio (buses, SFX, music crossfade), world (tilemap runtime).
  7. devtools: debug overlay (hitboxes, FPS, entity inspector), data hot reload; testing: headless runner.
  8. Benchmarks + size report. Gate demo: controllable box on a tilemap with slopes and one-way platforms.

1b — Sample side-scroller (gate 1b): the game described in roadmap.md, e2e tests, generated API docs, docs/getting-started.md.

Commands you’ll get at the 1a gate: pnpm install, pnpm dev (demo with hot reload), pnpm test, pnpm build, pnpm docs, pnpm size.