@rogue-x/engine
v0.1.0
Published
RogueX — a platform-free, data-driven game engine SDK (core + browser host).
Maintainers
Readme
@rogue-x/engine
A platform-free, data-driven game engine SDK. You describe a game as data — a
GameDefinition of tiles, scenes, entities, actions, and events — and the engine
runs it. The browser host (@rogue-x/engine/web) renders, drives the clock, binds
input, and plays audio, so a complete game can be a single definition file plus one
<GameHost />.
Status: web-first. The browser host is the supported runtime today. A React Native / Expo host is a work in progress.
Install
npm install @rogue-x/engine react react-domreact is an optional peer dependency — only needed if you use the /web host.
Quick start
import { GameHost } from '@rogue-x/engine/web';
import type { GameDefinition } from '@rogue-x/engine';
const definition: GameDefinition = {
title: 'Hello',
profile: 'grid-turn-based',
tileTypes: { floor: { id: 'floor', visuals: ['plain'] } },
scenes: {
room: {
topology: { kind: 'square4', width: 5, height: 5 },
layers: [{ id: 'ground', role: 'logical', fill: 'floor' }],
entities: [
{ id: 'hero', type: 'hero', position: { kind: 'discrete', loc: { x: 2, y: 2 } }, data: {} },
],
},
},
initialSceneId: 'room',
onStep: () => ({ patch: {} }),
};
export default () => <GameHost definition={definition} tileSize={40} />;See GETTING_STARTED.md for the full walkthrough — defining a game, the action/patch model, events, modes, audio, and mounting the host.
Entry points
| Import | What it is |
| ------------------------- | ------------------------------------------------------ |
| @rogue-x/engine | Core: createGame, types, coordinate + patch helpers. |
| @rogue-x/engine/web | Browser host: GameHost, VisualConfig, controls. |
| @rogue-x/engine/tools | Authoring helpers (content validation). |
| @rogue-x/engine/testing | Headless test session helpers. |
Optional, swappable modules (e.g. pathfinding) live in
@rogue-x/engine-modules.
License
MIT
