npm install @miskamyasa/mobx-clicker-game-engine mobxCreate JSON files in public/settings/my-theme/:
workers.jsonlevels.jsonoperations.jsonupgrades.jsonachievements.jsonarticles.jsonprestige-upgrades.json
See Data Contracts for the schema of each file. Use the engine Zod schemas in src/stores/*.ts as the source of truth for structure and validation rules.
Provide dataUrls with the required keys. The object keys must match the engine contract; the filenames can be anything.
import { createEngine } from "@miskamyasa/mobx-clicker-game-engine"
const theme = "my-theme"
const engine = createEngine({
dataUrls: {
workers: `/settings/${theme}/workers.json`,
levels: `/settings/${theme}/levels.json`,
operations: `/settings/${theme}/operations.json`,
upgrades: `/settings/${theme}/upgrades.json`,
achievements: `/settings/${theme}/achievements.json`,
articles: `/settings/${theme}/articles.json`,
prestigeUpgrades: `/settings/${theme}/prestige-upgrades.json`,
}
})engine.game.start()Call engine.game.stop() when the game should pause or the app unmounts.
The engine is framework-agnostic. Use MobX bindings for your framework of choice to observe store properties and call store methods from your UI layer.
Typical integration steps:
- Render core stats — Show resources, level, and progression state from the engine.
- Add the primary click action — Bind a button to
engine.game.click(). - Add automation and upgrades — Build panels for workers and upgrades, wire them to the engine actions.
- Add operations and codex UI — Render operations, achievements, and articles as your content expands.
- React: Use MobX bindings from mobx-react-lite.
- Vue: Use MobX bindings from mobx-vue-use.
Persistence is built into the engine (auto-save, offline progress, localStorage). You don't need to implement save/load manually unless you want custom storage. See SyncStore in the API reference for details.
- API Reference — Full store API
- Examples — Themed game content for inspiration
- Game Development Checklist — Phase-by-phase action items