Razarion – open-source multiplayer browser RTS on one persistent shared world (Babylon.js + Java/WASM)

Razarion is an open-source multiplayer RTS that runs in the browser. All players share one
persistent planet — no matches, no lobbies, no download, no registration. It is in alpha, so
expect rough edges.

:video_game: Play: https://www.razarion.com (desktop browsers)
:movie_camera: Gameplay video: https://www.youtube.com/watch?v=yqbN2bLHJyI&t=92s
:computer: Source (LGPL): GitHub - Razarion/razarion · GitHub

Babylon.js does all the rendering. The game engine is Java compiled to WebAssembly with TeaVM
(WASM-GC), so client and server run the identical simulation code; Angular drives the 2D UI.

A few Babylon.js details:

  • Terrain tiles blend land, beach and underwater in a single NodeMaterial, by vertex
    height with smoothstep — no seam at the shoreline. The grass/sand splatter mask is
    procedural (domain-warped Perlin, 512×512) and its normal comes from screen-space derivatives
    of the mask, so no extra normal texture is needed.
  • Water is a NodeMaterial with a per-tile reflection CubeTexture, plus a whitecap
    material assembled programmatically from node blocks, ribbon wakes and a bow-wave halo per
    ship.
  • Units are glTF through AssetContainer and AnimationGroups; explosions, beams and muzzle
    flashes are node materials too — roughly 120 across the codebase.
  • The in-game content editor opens the Node Material Editor and the Inspector on the live
    scene, so a material can be tuned in the running game and saved back to the server. Easily the
    biggest productivity win of the whole project.

Feedback on performance with many units on screen, and on whether the shoreline holds up at
close zoom, is very welcome.

12 Likes