Packages
V12 is published on npm as five packages under the @v12-engine scope. They are versioned as one: install the same version of each.
| Package | What it is for | Install |
|---|---|---|
@v12-engine/engine | The simulation: the world, units, orders, hooks, sessions and a game server. No renderer, no DOM; runs in Node and in a page. | npm install @v12-engine/engine |
@v12-engine/client | A game on a page: the 3D view, the player's input, the HUD and its interface kit, an app of scenes. | npm install @v12-engine/client |
@v12-engine/editor | The map editor of a game, its panels and tools, and the dev server plugin that saves a project's maps and assets. | npm install -D @v12-engine/editor |
@v12-engine/create | Makes a new project from a starter (npm create @v12-engine my-game), and the v12 command a project runs. | npm create @v12-engine my-game |
@v12-engine/assets | Free art a game may ship with: characters with their clips, buildings, nature, props, sounds and music, all CC0 and credited. | npm install @v12-engine/assets |
@v12-engine/render | The renderer of the library's own on WebGPU (on Babylon Lite's low-level layer), which the client and the editor draw with. A dependency of theirs: a project does not name it. | (with the client) |
A project made by npm create @v12-engine already has the ones it needs; see Install. The client and the editor take the engine and Vite as peers, so the project has one copy of each; the renderer comes with the client:
sh
npm install @v12-engine/engine @v12-engine/client
npm install -D @v12-engine/editor viteEntry points
Each package gives more than one entry: a page that does not import an entry carries none of its code.
@v12-engine/engine
| Import | What it gives |
|---|---|
@v12-engine/engine | A game's rules: createGame, the world, units, orders, hooks, sessions. |
@v12-engine/engine/server | A game server in Node: startServer. |
@v12-engine/engine/testing | What a game's tests are written with: testWorld. |
@v12-engine/engine/ai | The kit computer players are made of: defineBrain, and the melee player meleeBrain. |
@v12-engine/engine/debug | The debug commands, the inspector over a world, and the engine's invariant checks: debugCommands. |
@v12-engine/engine/schemas/pack.schema.json | The JSON schema of a content pack, for an editor's completion. |
@v12-engine/client
| Import | What it gives |
|---|---|
@v12-engine/client | A game on a page: launch, and what a game's view is written with. |
@v12-engine/client/app | An app of scenes: startApp, menus, a campaign, replays, a server's game joined. |
@v12-engine/client/kit | The interface kit: its components, toasts, confirms and menus. |
@v12-engine/client/hud | The HUD's widgets, for a HUD of a game's own. |
@v12-engine/client/ground | Ground textures made in code, for a worker or a tool with no page: serveGroundTextures. |
@v12-engine/client/looks-file | The types of a game's looks.json. |
@v12-engine/client/debug | The debug tools: the debug panel and the stats window. |
@v12-engine/client/testing | What a test of a game's page is written with. |
@v12-engine/client/vite | The dev server's plugin of the shared art: assetsPackage. |
@v12-engine/client/styles.css | The interface's stylesheet, built. |
@v12-engine/client/tailwind.css | The same stylesheet as it is written, for a project with Tailwind of its own. |
@v12-engine/client/fonts.css | The interface's fonts. |
@v12-engine/client/internal | The parts the map editor draws with. Not for games: it may change in any release. |
@v12-engine/client/lite | The main entry under the name it had while the client had two renderers: kept for the games that import it. |
@v12-engine/client/lite-views | What a tool that draws a world its own way is made of: the world's views on the renderer, the camera, the fog, the effects. For the map editor and tools. |
@v12-engine/client/common | The main entry's names that load no renderer. |
@v12-engine/client/internal-common | What the map editor takes of the client that loads no renderer. Not for games. |
@v12-engine/editor
| Import | What it gives |
|---|---|
@v12-engine/editor | The map editor on a page: openEditor, and the panels, tools and kinds a game brings to it. |
@v12-engine/editor/vite | The dev server's plugin that reads and writes a project's files: editorFiles. |
@v12-engine/editor/styles.css | The map editor's own stylesheet. |
@v12-engine/editor/map-command | Maps from the command line, with no browser (v12 map check, v12 map picture). |
@v12-engine/editor/testing | What a browser test reaches of the editor on its page. |
@v12-engine/editor/lite | The map editor's stage on the renderer, fetched as the editor opens. |
@v12-engine/editor/scene | The map editor as a scene of an app (editorScene), alone. |
@v12-engine/create
| Import | What it gives |
|---|---|
npm create @v12-engine | The command that makes a project (Install lists its flags). |
v12 | The project's command (npx v12 map …), installed with the editor. |
@v12-engine/create | The same in code: make a project from a script. |
@v12-engine/assets
| Import | What it gives |
|---|---|
@v12-engine/assets | The index that names each file in code, typed. |
@v12-engine/assets/manifest.json | What each file is: a model's clips, parts and size, a picture's size, a sound's takes. |
@v12-engine/assets/sizes.json | Each model's measured size (width, height, depth). |
@v12-engine/assets/groups/* | The files themselves, by group (characters, animations, trees, village, props, gear, ground, ...). |
@v12-engine/assets/scripts/lod.mjs | Makes the lighter levels of detail of a model. |
Versions
What changed in each release is in the package's CHANGELOG.md (on npm, and in packages/<name>/ of the repository). At 0.x a minor version (0.1 to 0.2) may break a game; a patch does not.