Skip to content
Joe Tebbett edited this page Jul 7, 2026 · 2 revisions

sim

sim is a framework for building browser-based life-simulation games. You write your game as JSON content plus optional TypeScript extensions; the framework supplies the runtime, a content editor, and the build tooling. A game compiles to a single self-contained HTML file.

It is structured like a modern web framework: a game is its own repo that depends on @chemicalluck/engine and the sim CLI, the same way an app depends on a framework and its CLI.

The pieces

Package Role
@chemicalluck/engine The game-agnostic runtime, the content editor, and the Vite plugins. Shipped as source.
@chemicalluck/sim (CLI, bin sim) dev / build / editor / preview / check. Owns the build config — your game has no vite.config.ts.
@chemicalluck/create-sim-game Scaffolds a new game repo from the starter template.
@chemicalluck/config Shared TypeScript / ESLint / Prettier presets.

Start here

npm create @chemicalluck/sim-game my-game
cd my-game
npm install
npm run dev        # game at /, content editor at /editor

Then read Getting Started.

Guide

Core idea: the engine never imports your game

The engine is strictly game-agnostic. It discovers your content and extensions at build time through generated Vite virtual modules — it never imports src/game/ directly. That boundary is what lets one engine power many games. See Architecture.

Clone this wiki locally