Its own WebGPU renderer
Every frame drawn by V12's own renderer, on WebGPU. Models, shadows, clustered lights, water, sky and post-processing, and a kit for drawing shapes and shaders of your own.
How it fits together
Drawn by its own WebGPU renderer. Armies, heroes, fog of war, a map editor and multiplayer, in TypeScript. You write the rules and the look; V12 runs the rest, in the browser, on a server and in your tests.
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.
import { startApp } from '@v12-engine/client/app'
import { createGame, createMap } from '@v12-engine/engine'
import '@v12-engine/client/styles.css'
const game = createGame({ id: 'duel', name: 'Duel', victory: null })
game.unit({ id: 'knight', name: 'Knight', kind: 'unit', radius: 0.5, sight: 12, stats: { health: 400, moveSpeed: 4 } })
game.maps({ field: createMap({ name: 'Field', width: 32, depth: 32, game: 'duel' }) })
game.onStart((world) => [1, 2].forEach((owner) => world.spawn('knight', { at: { x: 8 + owner * 8, z: 16 }, owner })))
game.view({ units: { looks: { knight: { height: 1.6, shapes: [{ shape: 'box', size: [0.7, 1.4, 0.7], offset: [0, 0.7, 0], color: 'team' }] } } } })
startApp({ target: '#game', game })A start screen, a field, two knights, fog, selection, orders, a HUD and a minimap. The same game runs on a server (startServer({ game })) and in tests (testWorld(game)).
npm create @v12-engine my-gamePick a starter: an empty game, a melee RTS with workers and a computer player, a three-mission campaign, or the examples, 142 small scenes that each show one thing the engine does, ready to read and copy. Then the Quick start.