Skip to content

What is V12 ​

V12 Engine is a TypeScript game engine for real-time strategy games in the browser, drawn by a WebGPU renderer of its own: units you select and order, buildings, resources, heroes, fog of war, a map editor, and multiplayer on a server. You write the rules and the look; V12 does the rest.

Alpha

V12 is in alpha and under active development. APIs, file formats and saves can change between releases, @public names included, and every change is listed in the packages' changelogs. Pin an exact version for anything you ship.

ts
import { launch } from '@v12-engine/client'
import { createGame } from '@v12-engine/engine'
import '@v12-engine/client/styles.css'

const game = createGame(rules).view(view) // the rules (a Rules) and how they look (a GameView)
launch({ target: '#game', game, map })

That draws the ground, units, fog, HUD and minimap, and turns the player's clicks and keys into orders. Start with the Quick start.

What's in the box ​

PartWhat you get
Simulation30 ticks a second, seeded: the same seed plays the same game. Orders, combat, fog, Recast pathfinding with crowds.
RulesUnits, abilities, buffs, items, upgrades as data; hooks, events, timers, sequences and components for the rest.
ClientWebGPU, a HUD, minimap, control groups, rebindable keys, settings, pause menu, saves, graphics quality.
Map editorGround, water, cliffs, units, regions, paths. Played on the spot, saved as files of your project. Add your own panels and tools.
ServerOne simulation, each player told only what their side may see. Lobby, reconnection, computer players.
ShippingErrors caught and logged, saves that survive a patch, the simulation off the drawing thread, large armies, desktop and offline.

The packages ​

PackageWhat it is
@v12-engine/engineThe simulation. No DOM: runs in Node too.
@v12-engine/clientThe game on a page: its renderer (@v12-engine/render, WebGPU) draws it, Solid draws the interface.
@v12-engine/editorThe map editor.
@v12-engine/createnpm create @v12-engine: a project to start from.

See How it fits together and Entry points.

Whole games to learn from ​

  • Campaign: three missions and a hero. The campaign starter, built step by step in the tutorial.
  • Examples: what the engine can do, a small scene each, to read and copy. The examples starter (npm create @v12-engine my-examples -- --starter examples).
  • Melee: workers, gold, buildings and a computer player. The melee starter, and apps/example/src/games/melee in the repository.

Get it ​

The packages are on npm. npm create @v12-engine my-game makes a project with the ones it needs, or install them yourself (npm install @v12-engine/engine @v12-engine/client). What each one is for: Packages.