Skip to content

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.

PackageWhat it is forInstall
@v12-engine/engineThe 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/clientA 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/editorThe 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/createMakes 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/assetsFree 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/renderThe 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 vite

Entry points ​

Each package gives more than one entry: a page that does not import an entry carries none of its code.

@v12-engine/engine ​

ImportWhat it gives
@v12-engine/engineA game's rules: createGame, the world, units, orders, hooks, sessions.
@v12-engine/engine/serverA game server in Node: startServer.
@v12-engine/engine/testingWhat a game's tests are written with: testWorld.
@v12-engine/engine/aiThe kit computer players are made of: defineBrain, and the melee player meleeBrain.
@v12-engine/engine/debugThe debug commands, the inspector over a world, and the engine's invariant checks: debugCommands.
@v12-engine/engine/schemas/pack.schema.jsonThe JSON schema of a content pack, for an editor's completion.

@v12-engine/client ​

ImportWhat it gives
@v12-engine/clientA game on a page: launch, and what a game's view is written with.
@v12-engine/client/appAn app of scenes: startApp, menus, a campaign, replays, a server's game joined.
@v12-engine/client/kitThe interface kit: its components, toasts, confirms and menus.
@v12-engine/client/hudThe HUD's widgets, for a HUD of a game's own.
@v12-engine/client/groundGround textures made in code, for a worker or a tool with no page: serveGroundTextures.
@v12-engine/client/looks-fileThe types of a game's looks.json.
@v12-engine/client/debugThe debug tools: the debug panel and the stats window.
@v12-engine/client/testingWhat a test of a game's page is written with.
@v12-engine/client/viteThe dev server's plugin of the shared art: assetsPackage.
@v12-engine/client/styles.cssThe interface's stylesheet, built.
@v12-engine/client/tailwind.cssThe same stylesheet as it is written, for a project with Tailwind of its own.
@v12-engine/client/fonts.cssThe interface's fonts.
@v12-engine/client/internalThe parts the map editor draws with. Not for games: it may change in any release.
@v12-engine/client/liteThe main entry under the name it had while the client had two renderers: kept for the games that import it.
@v12-engine/client/lite-viewsWhat 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/commonThe main entry's names that load no renderer.
@v12-engine/client/internal-commonWhat the map editor takes of the client that loads no renderer. Not for games.

@v12-engine/editor ​

ImportWhat it gives
@v12-engine/editorThe map editor on a page: openEditor, and the panels, tools and kinds a game brings to it.
@v12-engine/editor/viteThe dev server's plugin that reads and writes a project's files: editorFiles.
@v12-engine/editor/styles.cssThe map editor's own stylesheet.
@v12-engine/editor/map-commandMaps from the command line, with no browser (v12 map check, v12 map picture).
@v12-engine/editor/testingWhat a browser test reaches of the editor on its page.
@v12-engine/editor/liteThe map editor's stage on the renderer, fetched as the editor opens.
@v12-engine/editor/sceneThe map editor as a scene of an app (editorScene), alone.

@v12-engine/create ​

ImportWhat it gives
npm create @v12-engineThe command that makes a project (Install lists its flags).
v12The project's command (npx v12 map …), installed with the editor.
@v12-engine/createThe same in code: make a project from a script.

@v12-engine/assets ​

ImportWhat it gives
@v12-engine/assetsThe index that names each file in code, typed.
@v12-engine/assets/manifest.jsonWhat each file is: a model's clips, parts and size, a picture's size, a sound's takes.
@v12-engine/assets/sizes.jsonEach 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.mjsMakes 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.