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

**URL:** <https://forum.babylonjs.com/t/razarion-open-source-multiplayer-browser-rts-on-one-persistent-shared-world-babylon-js-java-wasm/63987>\
**Category:** Demos and projects\
**Tags:** game, glb, open-source, terrain, multiplayer\
**Created:** [August 23, 2026, 9:22am UTC](https://forum.babylonjs.com/t/razarion-open-source-multiplayer-browser-rts-on-one-persistent-shared-world-babylon-js-java-wasm/63987 "2026-08-23T09:22:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Razarion](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/razarion/32/51617_2.png) [@Razarion](https://forum.babylonjs.com/u/Razarion)\
**Post date:** [August 23, 2026, 9:22am UTC](https://forum.babylonjs.com/t/razarion-open-source-multiplayer-browser-rts-on-one-persistent-shared-world-babylon-js-java-wasm/63987/1 "2026-08-23T09:22:02Z")

</div>

![tesla_1920x1080_2026-08-12_15-52-03](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/3/9/39263eba50ee945c07c7b9bede2e1f2da0cf7cc7.jpeg)

**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.

🎮 **Play:** [https://www.razarion.com](https://www.razarion.com) (desktop browsers)  
🎥 **Gameplay video:** [https://www.youtube.com/watch?v=yqbN2bLHJyI&t=92s](https://www.youtube.com/watch?v=yqbN2bLHJyI&t=92s)  
💻 **Source (MIT):** [https://github.com/Razarion/razarion](https://github.com/Razarion/razarion)

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 `AnimationGroup`s; 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.

 ![screenshot2](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/5/9/59fe09b99614032d7d2c28d9d3c07e8dbe6089d2.jpeg)

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

---

<div class="post-metadata">

**Author:** ![jamiewalls02](https://avatars.discourse-cdn.com/v4/letter/j/54ee81/32.png) [@jamiewalls02](https://forum.babylonjs.com/u/jamiewalls02)\
**Post date:** [August 31, 2026, 12:22pm UTC](https://forum.babylonjs.com/t/razarion-open-source-multiplayer-browser-rts-on-one-persistent-shared-world-babylon-js-java-wasm/63987/2 "2026-08-31T12:22:56Z")

</div>

> [@Razarion](#):
>
> **arion** 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.
> 
> 🎮 **Play:** [https://www.razarion.com](https://www.razarion.com) (desktop browsers)  
> 🎥 **Gameplay video:** [https://www.youtube.com/watch?v=yqbN2bLHJyI&t=92s](https://www.youtube.com/watch?v=yqbN2bLHJyI&t=92s)  
> 💻 **Source (LGPL):** [GitHub - Razarion/razarion · GitHub](https://github.com/Razarion/razarion)
> 
> 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 `AnimationGroup`s; 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

Military units like the Viper (land attack unit) and Hydra (armed warship) can be built to clear out enemies and objectives [00:55], [03:34].

---

<div class="post-metadata">

**Author:** ![Razarion](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/razarion/32/51617_2.png) [@Razarion](https://forum.babylonjs.com/u/Razarion)\
**Post date:** [October 9, 2026, 8:49pm UTC](https://forum.babylonjs.com/t/razarion-open-source-multiplayer-browser-rts-on-one-persistent-shared-world-babylon-js-java-wasm/63987/3 "2026-10-09T20:49:39Z")

</div>

Update: the beginners’ island got a new ground. Here is a devlog of the work, with before/after comparisons for each step:

[![](https://img.youtube.com/vi/tNPiJ0_wTy0/maxresdefault.jpg "My browser RTS island looked boring - so I rebuilt the terrain (devlog)") ](https://www.youtube.com/watch?v=tNPiJ0_wTy0)

The island used to look flat and boring, so this is what changed:

- Hills and relief: gentle hills on the land. A web worker computes sky visibility and curvature for each terrain tile, including across tile edges. The ground shader uses them to darken hollows, lighten crests and keep the sky light out of places the land hides.
- Ground materials follow the shape of the land: lush grass in hollows, dry grass on crests, bare earth on slopes, stony ground at the foot of rock. Each material mixes large and small noise, which replaced the random splatter mask (and freed a texture unit). The texture coordinates are warped by large-scale noise, so the 16 m repeat no longer shows as a grid.
- Generated textures: the grass and earth textures are now generated instead of photographed. The alpha channel carries height, so grass grows into earth one tuft at a time. The photo grass put its contrast into single blades and looked like carpet at RTS camera distance.
- Light: low side sun, ACES tone mapping and contrast/saturation as a post process, plus image-based lighting for units, buildings and plants. (The IBL had never loaded, because the .env decoder shader was missing from the bundle.)
- Life: drifting cloud shadows (simplex noise in the shader), plants that sway in the wind (a material plugin), and trodden paths from the start pads to the coast.
- Sprites stand on the ground: vegetation sprites use the same ground rules on the CPU as the shader does on the GPU. They get darker growth at their foot and are shaded by the same sun, sky and cloud shadows.

Two other changes since my first post:

- The code is now under the MIT license (it was LGPL).
- The game starts noticeably faster, especially on phones: less data per start, and the game no longer waits for the models to arrive.

Play: [https://www.razarion.com](https://www.razarion.com)  
Source: [GitHub - Razarion/razarion · GitHub](https://github.com/Razarion/razarion)

I’d love feedback on the ground. Does it read as natural terrain at RTS zoom, or does something still look tiled? If you know a cheaper way to do the per-tile relief (sky visibility and curvature) than computing it in a worker, I’d like to hear about that too.

---

<div class="post-metadata">

**Author:** ![Leonardo\_Villalobos](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/leonardo_villalobos/32/9628_2.png) [@Leonardo\_Villalobos](https://forum.babylonjs.com/u/Leonardo_Villalobos)\
**Post date:** [October 9, 2026, 9:06pm UTC](https://forum.babylonjs.com/t/razarion-open-source-multiplayer-browser-rts-on-one-persistent-shared-world-babylon-js-java-wasm/63987/4 "2026-10-09T21:06:13Z")

</div>

Wow, well done.
