Universal Game Engine

Any game.
Any topology.
Zero game-specific code.

One micro-kernel engine that plays chess, go, draughts, reversi, mancala, backgammon, shogi, xiangqi, and every variant in between. Games are configuration files. The engine does the rest.

1166 Tests passing
13 Game families
154 Variants
5 Topologies
96 Piece sets

The Platform

Open Source

Pure ESM, zero dependencies, no build step. 15 packages composing into a universal game runtime. MIT licensed.

13 Game Families

Each plugin handles all variants in its family. Same engine, different configuration.

Chess 75
Go 14
Draughts 20
Reversi 3
Hex 1
Mancala 8
Morris 7
Backgammon 8
Big 2 1
Halma 2
Shogi 4
Xiangqi 2
Race 9

5 Topology Types

The universal adapter layer. Every package above topologies defines a contract. Topologies implement it. Higher packages never know which topology they consume.

Grid

Rectangular boards. Chess, draughts, reversi, halma, shogi, xiangqi.

119 variants

Hex

Axial coordinates. Hexagonal and rhombus shapes. Hex, Glinski chess.

5 variants

Track

Linear and circuit paths. Pachisi, chaupar, backgammon, landlords.

17 variants

Pit

Mancala sow layouts. Kalah-correct paths with stores.

8 variants

Graph

Arbitrary node-edge structures. Morris, alquerque, custom boards.

7 variants

For Developers

<iframe src="engine.moddable.games/play/?game=chess/standard&embed=1"></iframe>

Bidirectional postMessage bridge for state sync, move submission, and event handling. Embed any game in any page with a single line.

import { createGame } from '@moddable/engine'

const game = createGame('reversi/standard')
const moves = game.getLegalMoves()
game.execute(moves[0])

ES module. Zero dependencies. Mount into any DOM container or run headless. Full game lifecycle from one import.

play_move | get_legal_moves
suggest_move | render_board
create_game | list_variants
evaluate_position | validate_game_def

AI assistant integration. Let Claude or any MCP client play, analyse, and generate games via tool protocol.

Architecture

Five resource types compose independently. No game names in core. No topology-specific logic in schema. Every new topology auto-works with all existing packages.

Layer 4
AI Game Factory
Layer 3
Render Schema Themes
Layer 2
Piece Behaviour Rules Components
Layer 1
Grid Hex Track Pit Graph
Layer 0
Core