The demo game
A cultivation-themed mini MMO built on KBEngine, shipped inside this repository as the living acceptance target for the kode extension: templates/assets holds the game asset tree, templates/kbe the engine fork, templates/godot-client a headless GDScript client, and every feature batch is verified against a real engine cluster before it is marked done.
What it is
- Positioning: a small xianxia (cultivation) MMO — cultivators fight monsters, gain experience, break through realms, found sects, keep pets, equip gear and use talismans. It is deliberately small, but every face of it runs on the real engine (login, cells, AOI, MySQL, bots).
- Purpose: each feature batch lands with a real-machine acceptance run (headless runners + evidence files), which doubles as the end-to-end regression for the extension's language features (defs, base/cell scripts, interfaces, types) that kode indexes and diagnoses.
Shipped gameplay (all real-machine accepted)
| Area | What exists today |
|---|---|
| Cultivation | Five spirit roots, five realms (QiRefining → SpiritTransform, exp 0/100/300/900/2700), realm breakthrough on exp |
| Combat | Melee attack (range 3.5, 15 damage, 1.5s cooldown), spell damage with five-element affinity multipliers (overcome 1.5 / generate 1.1 / overcome-by 0.8) |
| Monsters | Spawn ring, AI state machine (idle/wander/chase/attack/return, aggro 12, leash 30), death rewards (10 gold, 30 exp), drops, respawn |
| Inventory | 20-slot bag with stackable items, spirit-stone gold, monster drops |
| Items | Item entity (base-only persistent), equipment (slot / strengthen / bonus attributes), talismans (power / duration / charges, AOE on use) |
| Pets | base+cell companion with follow/teleport distances (5 / 20) |
| Formations | Up to 5 members within radius 10 of the anchor, +10% damage per member |
| Sects | Roster up to 100, founding cost 500 gold, donations, sect instanced maps (spaceIndex = 1000 + sectDbid); rank ladder (leader/elder/inner/outer/probation), permission matrix (invite/kick/promote/assign-quest/open-map), three departments with hall heads = elders |
| Quests | Task entities (base persisted, autoload restore) for main/daily/side quests plus a sect quest board (elder+ posts, members accept); kill/realm progress hooks, delivery pays exp on the base and gold/items through the live cell bag |
| NPCs | Static cell-only presences (world guide + sect hall official) that talk, offer quests through the exposed method face (scan / talk / walk-to / take-offer), and hand out world quests directly or post sect bounties to the board (posterDbid=0) |
| Cross-server arena | A second service group (separate uid, one shared MySQL database) hosts a boss arena; a home-side custodian watches the persisted arena state, engine custody arbitration denies home loads while the arena holds the avatar, and the avatar returns home with its win count |
Persistent mail rows in tbl_Mail (+ the tbl_Mail_attachments child table): send by recipient name, login pull of unread headers, claim moves attachments into the live bag through the real drop channel, delete removes row + child rows; the mailbox is the database itself | |
| Persistence | MySQL tables for accounts, avatars, items, sects and more; autoload on boot; rebind on re-login |
| Clients | Headless bots loop, Godot protocol skeleton with stats panel and AOI object view |
| Engine dist | Linux + Windows binaries on the fork's GitHub releases (0.1.2) |
Features still on the plan (not in the tree yet): container items — see the repository todo.md for the live list.
Where to go next
- Getting started — MySQL, cluster start, bots, Godot client
- Entity model — defs, interfaces, script faces, constants
- Engine coverage matrix — which KBEngine faces the demo exercises
- kode walkthrough matrix — the 11-face editor walkthrough
- Acceptance evidence — evidence files and what each proves