dacha
v0.19.0
Published
A data-driven TypeScript game engine for the browser.
Maintainers
Readme
Dacha is a game engine with a core runtime and built-in components and systems. A game combines the engine with its JSON configuration and custom game logic.
Actors are composed of components that hold data, while systems contain the logic that acts on them. Scenes, actors, templates and systems can be described in JSON and assembled into a running world by the engine.
Rendering, physics, animation, audio, input and camera systems ship with the engine.
The fastest way to start is the scaffolder — it writes a complete, running project:
npm create dacha@latest my-gameTo add the engine to a project you already have:
npm install dachaimport {
Engine,
Renderer,
CameraSystem,
Transform,
Sprite,
Texture,
} from 'dacha';
// the game data, built in the editor and saved as JSON
import config from '../data/data.json';
const engine = new Engine({
config,
systems: [Renderer, CameraSystem],
components: [Transform, Sprite],
assets: [Texture],
});
void engine.play();That is the whole entry point. config describes the game, and you can build it in
dacha-workbench, the visual editor.
See Getting started for the full
setup.
License
MIT © Mikhail Remmele
