Persistent shared-world 2D RPG built with PixiJS + Convex.
- Multiplayer presence: real-time player sync with interpolation and presence heartbeats
- Level creation tooling: in-game build mode for layers, per-layer tilesets, collision, labels, and portals
- Object system: placeable map objects with toggle logic, ambient/interact audio, and door state machines with collision overrides
- NPC system: sprite definitions, map instances, profile-backed behavior, procedural + AI dialogue modes, and hostile/combat behavior
- Item system: item definitions, world item placement, pickup flow, respawn scheduling, inventory updates, and pickup audio
- Quest system: quest definitions, active quest tracking, item/kill objective progress, HUD quest log, and reward/failure flows
- Combat system: server-authoritative hostile combat, aggro retaliation, NPC defeat/respawn, XP + loot drops, and combat notifications
- Auth + permissions: Convex auth, guest mode, role/ownership checks, map editor permissions, and visibility scopes (
private/public/system) - Ops tooling: admin scripts, dumps/backups/restores, migration helpers, and runbook docs
- Frontend game engine (
src/engine):Game,MapRenderer,EntityLayer,ObjectLayer,WorldItemLayer, audio, input - Editor/tooling UI (
src/editor,src/ui,src/sprited): map editor, object/NPC/item editors, sprite tool - Backend domain logic (
convex): maps, mapObjects, worldItems, items, quests, mechanics/combat, npcProfiles, npcEngine, presence, auth/admin/migrations - Dialogue/AI runtime (
src/npc,convex/npc): NPC mode resolution, chat pipeline, memory/conversation services
- Node.js 18+
- Convex account/project
- Optional: Braintrust credentials for AI-NPC flows
- Install dependencies:
npm install
- Copy local env template:
cp .env.local.example .env.local
- Configure required Convex env vars (see auth/ops docs for full list), including:
JWT_PRIVATE_KEYJWKSADMIN_API_KEY- optional OAuth + Braintrust vars
- Run local dev:
npm run dev
npm run dev- frontend + local Convex backendnpm run dev:cloud- frontend + cloud Convex backendnpm run build/npm run lint/npm run typechecknpm run users -- <command>- user/role managementnpm run dump,npm run dump:full,npm run backup:world,npm run restore:world
docs/LevelCreate.md- level creation and map editing workflowsdocs/Objects.md- object definitions, toggleables, doorsdocs/NPCs.md- NPC authoring, profiles, AI/chat/combat behaviordocs/Items.md- item definitions, world item placement, pickup/respawndocs/Combat.md- combat architecture, aggro flow, tuning knobs, and troubleshootingdocs/Quests.md- quest design, lifecycle, and runtime integrationsdocs/AuthPermissions.md- auth, ownership, roles, and permission modeldocs/Operations.md- backups, restore procedures, admin operations