← Back to Portfolio
● Active Staging Stage Cocos Creator Game Development

还债公会 (Debt-Paying Guild) — WeChat Mini Game

Solo-engineering a configuration-driven RPG guild management game using Cocos Creator 3.8 and TypeScript, integrating serverless WeChat CloudBase synchronization, and optimizing startup package boundaries.

40+
Original Adventurers
30
Campaign Story Chapters
100%
Config-Driven Game Loops
Active
Development Phase

🎮 Original Game Design & Systems Engineering

The Project Concept: 《这个公会正在还债》 (working title: Dungeon Workers) is a light RPG WeChat Mini Game. The player acts as the manager of a bankrupt adventurer guild, hiring quirky, flawed mercenaries (e.g. Greedy Thieves, Cowardly Heroes) to dispatch on dungeon contracts, handle comedic text events, collect rewards, and deduct salaries to pay off public guild debts.

Engineering Decoupled Boundaries (Managing Asset Coordinates): One major challenge in Cocos Creator development is coordinate layout fine-tuning, which is tedious to hardcode. I designed a clean **Core-Presentation Decoupled Architecture**:

  • Core Game Loop (TypeScript): Holds data schemas, event routing systems, combat simulators, and gacha mathematical tables. It remains 100% independent of asset positions.
  • Presentation (Cocos Prefabs): Isolates sprite coordinates, button margins, and UI node hierarchies. This separation allowed me to focus on building the complex backend state machines and configuration pipelines, leaving visual asset placement to scene editors and design managers without touching the code.

WeChat Mini Game Platform Optimizations: Deploying a rich RPG to WeChat requires resolving severe size limitations. First, I optimized startup speed to satisfy WeChat's strict 4MB initial package threshold by separating the runtime into a minimal launch shell and lazy-loading the game package (v1_home sub-package) via remote asset bundles. Second, I linked monetized options (rewarded ads, monthly sub cards) with serverless cloud functions (applyCommercialServerAction) running on WeChat CloudBase to guarantee secure data ledger mutations.

📂 Deployed Game Repository

The core codebase separates logic engines from platform adapters and schema configurators:

assets/scripts/
│ ├── core/ ← Decoupled game loop logic
│ │ ├── PartnerSystem.ts ← Mercenary status
│ │ ├── SalarySystem.ts ← Invoice settlement
│ │ └── EventSystem.ts ← Random adventure state
│ ├── presentation/ ← Screen router configs
│ └── platform/ ← WeChat Mini Game SDK contracts
cloudfunctions/ ← Serverless CloudBase billing APIs
configs/resources/ ← JSON databases (monsters, events)
├── package.json ← Script pipeline config
└── tsconfig.json ← Strict TS configuration
📐 Explore Interactive Figma Design Prototype →
🤖 AI-Agent Co-Production

Codex Automated Pipeline

This project represents a cutting-edge pipeline in game production. By utilizing AI Agents (like Codex) and custom validation scripts, we automated boundary testing and config compliance before bundling:

1. Schema Configuration Validator
Coded a JSON validation utility (tools/validate-configs.ts) that runs automatically before compilation. It cross-checks all static events, skill trees, and items, ensuring there are zero missing links or unmapped asset hashes.
2. Cocos Runtime Boundary Tests
Configured automated verification tasks (npm run validate:feature:cocos-runtime) to compile scene bundles and test platform interfaces, ensuring that WeChat APIs (like ad playbacks or payment triggers) execute cleanly without breaking the web/native fallback limits.

Explore high-fidelity UI mockup designs (Figma assets) and raw developer workspace telemetry screenshots. Click on any image for systems details.

Looking for clean, modular game systems engineering?

I build configuration-driven 2D/3D systems and optimized WeChat Mini Game platform pipelines.