BrowserGaming.com

Guides

How to choose the stack for a browser game

Which engine, graphics API, physics library and multiplayer setup to pick for a browser game in late 2026, with current versions, browser support and what the games in our index actually run on.

Written
Updated
Last checked
Reading time
7 min
Sources
26

AI tools change week to week. Versions, prices and limits in this guide are as of Nov 15, 2026; check each tool’s own documentation for current ones.

For a 3D browser game in late 2026, start with Three.js and its standard WebGL renderer. Add Rapier only if you need real physics, and a plain WebSocket server only if you need multiplayer. That is what most of the shipped games examined here use, and it is the stack AI coding tools reach for by default.

The rest of this guide explains each choice and when to pick something else.

The short answer

You need Pick Why
3D graphics Three.js By far the most used, and the one AI tools know best
2D graphics Phaser 4 A complete 2D framework, released in April 2026
A visual editor PlayCanvas or Babylon.js Both come with tools Three.js leaves to you
A renderer WebGL, through Three.js Runs on almost every device
Physics None at first, then Rapier Many games do not need an engine for it
Multiplayer WebSockets and a small relay server Simple, and proven by the games below

What the games in our index run on

The five games examined for this guide all use Three.js. We read the version from each game’s own page on November 15, 2026. The other columns come from what we could observe in the browser and from the creators’ own accounts.

Game Three.js version Renderer Physics Multiplayer
fly.pieter.com r134 WebGL Not stated Python WebSocket server
Slow Roads r155 WebGL Not stated None
A Game About Capybaras Delivering Food r172 WebGPU, with a WebGL 2 fallback Not stated WebSocket on Cloudflare
Great Taxi Assignment: Vibe City r174 WebGL cannon-es None
Freeze Out r187 WebGPU, with a WebGL 2 fallback Not stated None, bots only

Two things stand out. None of the five used a full game engine. And two of them use Three.js’s newer WebGPU renderer: Freeze Out, whose creator says so, and the capybara game, which we saw ask the browser for WebGPU and fall back to WebGL 2 without it.

Pick the engine: Three.js unless you have a reason

Three.js is a 3D library, not a game engine. It draws the scene and leaves physics, networking and game logic to you. The latest release is r187, from October 30, 2026, and it is free under the MIT license.

Its lead is large. In the week of November 8, 2026, it was downloaded 36.4 million times from npm, against 922,000 for Phaser, 377,000 for Babylon.js and 190,000 for PlayCanvas.

That lead matters more when an AI writes your code. Pieter Levels did not choose Three.js for his flight sim: Cursor reached for it on its own. The Vibe Jam allows any engine and recommends Three.js. The Three.js project now publishes instructions written for language models.

The alternatives, and when they fit:

  • Babylon.js calls itself a game and rendering engine. Version 9.0 arrived in March 2026. It ships with a GUI system, an inspector, visual editors for materials, and Havok physics. Pick it when you want more built in.
  • PlayCanvas pairs an open-source engine with an editor that runs in the browser. The editor is free for public projects with 1 GB of storage, and $15 a month for a personal plan. Pick it when you want to place things visually or work as a team.
  • Phaser is for 2D. Version 4 was released on April 10, 2026, with a new WebGL renderer, and it ships skill files for AI agents.
  • Godot and Unity can export to the web, with costs. Godot 4 web builds run on WebGL 2 only and cannot use C#. Unity web builds run game code on a single thread. Both ship the whole engine with the game, so the first download is heavier, which is a problem when a jam bans loading screens.

Pick the renderer: WebGL now, WebGPU when you need it

WebGL 2 works for 97% of web users, according to caniuse. WebGPU, the newer and more capable API, works for 87%.

WebGPU support arrived in stages:

Browser WebGPU on by default since
Chrome and Edge, desktop Version 113, May 2023
Chrome, Android Version 121, January 2024, on Android 12 and later
Safari, Mac and iPhone Version 26.0, September 2025
Firefox, Windows Version 141, July 2025
Firefox, Apple Silicon Macs Version 147, January 2026

The gaps on November 15, 2026: Firefox on Linux and Android, and Chrome on Linux with some graphics cards.

Three.js has a renderer for each. Its WebGPU renderer falls back to WebGL 2 automatically when a browser lacks WebGPU, which is how Freeze Out runs everywhere. But the Three.js manual still calls that renderer experimental, and the project’s instructions for language models say to use the WebGL renderer by default.

So start with the WebGL renderer. Choose the WebGPU renderer at the start of a project, not halfway through, and only if you need what it adds: custom shaders written in the new shading language, or compute shaders. Switching later breaks custom shader code and the older post-processing effects.

We have since measured the two. On November 24, 2026, on an M4 MacBook Air with the browser’s frame-rate limit off, Three.js’s own comparison scene ran fastest on the WebGPU renderer with WebGPU, second on the classic WebGL renderer, and slowest on the WebGPU renderer’s WebGL 2 fallback, at a little over half the classic renderer’s rate. So the newer renderer is no longer the slow choice where a browser has WebGPU. The cost falls on the visitors who do not have it. The numbers, with ten listed games measured both ways, are in our WebGPU against WebGL guide.

Add physics only when you need it

A flight sim, a snowball fight and an endless road were all built without naming a physics engine. Leo, who made the capybara game, found that realistic physics for the stack of food was less fun than a simple rule: past a certain lean, an item has a chance of falling.

When you do need collisions and rigid bodies:

  • Rapier is the modern choice. It is written in Rust and runs in the browser as WebAssembly, under the Apache 2.0 license. Three.js ships an add-on for it.
  • cannon-es is simpler and pure JavaScript, and the taxi game used it. Its last release was in August 2022, so treat it as finished rather than maintained.
  • Jolt is a newer option that also has a Three.js add-on.
  • Havok comes with Babylon.js.

Vehicle physics is where AI help is weakest. See the physics section of our build guide.

Add multiplayer with the simplest thing that works

Two games in our index show the basic pattern. Each player’s browser opens a WebSocket to a small server, sends its position about ten times a second, and receives everyone else’s.

  • Your own small server. Levels’s first server was a Python script that Grok wrote. It needs a machine that stays on.
  • Cloudflare Durable Objects. These are small stateful servers that can hold WebSocket connections, with a free plan of 100,000 requests a day. The capybara game runs its shared city over a WebSocket on Cloudflare, though its creator does not say which Cloudflare product.
  • Colyseus. An open-source framework for game servers that handles rooms, matchmaking and keeping state in sync. It is free to host yourself, and its hosted service starts at $15 a month. Colyseus counted 48 entries in the 2026 Vibe Jam that used it.
  • Peer to peer with WebRTC. Players connect directly, so there is no game server to pay for. You still need a small server to introduce players to each other, and some home networks force traffic through a relay.

Old tutorials often recommend PartyKit. Its hosted platform shut down on October 23, 2026. The replacement is PartyServer, which runs on your own Cloudflare account.

Whatever you choose, plan for the cost of success. Leo points out that relay traffic grows with the square of the player count: five players is easy, fifty is not.

Keep your AI tool on current versions

AI tools learned from years of old code, and the games above show the result: versions from r134 to r187 in use at once.

Before you start, tell your tool which version you are using and point it at the Three.js instructions for language models. They cover two mistakes AI-written code makes often: loading an outdated copy of the library, and mixing the two renderers’ shader styles.

What changed

  1. Added our own measurement of the two Three.js renderers to the section on picking a renderer, with a link to the guide that holds the numbers. Filled in the capybara game's renderer, which had read 'Not checked': it draws with WebGPU and falls back to WebGL 2.

Sources

  1. three.js releases (r187, October 30, 2026) ↗
  2. three.js manual: WebGPURenderer ↗
  3. three.js: instructions for language models (llms.txt) ↗
  4. three.js manual: libraries and plugins (physics) ↗
  5. npm download counts for three, phaser, @babylonjs/core and playcanvas (week of November 8, 2026) ↗
  6. Babylon.js 9.0 announcement (March 26, 2026) ↗
  7. PlayCanvas engine and plans ↗
  8. Phaser releases (4.0.0, April 10, 2026) ↗
  9. Godot docs: exporting for the web ↗
  10. Unity 6.3 manual: Web platform technical overview ↗
Show all 26 sources
  1. caniuse: WebGPU and WebGL 2 usage share ↗
  2. Chrome: WebGPU release notes (113, 121, 144) ↗
  3. WebKit: features in Safari 26.0 (September 15, 2025) ↗
  4. Firefox 147 release notes (January 13, 2026) ↗
  5. gpuweb: WebGPU implementation status ↗
  6. Rapier documentation ↗
  7. cannon-es releases (last release August 2022) ↗
  8. MDN: The WebSocket API ↗
  9. Colyseus documentation and pricing ↗
  10. Cloudflare Durable Objects: pricing ↗
  11. PartyKit docs: shutdown notice ↗
  12. MDN: WebRTC signaling ↗
  13. Leo: how the capybara game was built, including multiplayer (Medium) ↗
  14. Pieter Levels: multiplayer over a Python WebSocket server (X) ↗
  15. three.js example: the comparison scene on WebGLRenderer ↗
  16. three.js example: the comparison scene on WebGPURenderer ↗

More guides

All guides