Building a 3D Browser Game with Three.js: Behind the Scenes
How do you build a no-install 3D browser game with Three.js? Practical notes on scene architecture, performance optimisation, mobile support and player saves.

Having started game development with Unity, I believed for a long time that "serious game = downloaded game". Then I noticed how powerful the browser had become. A 3D game that opens from a link, needs no install and runs on both phone and desktop — nothing is more frictionless for distribution.
Fields in Cities is a farming game I built with Three.js on that idea. In this post I share the technical decisions and lessons. You can try it at oyun.store/tarlalar.
Why Three.js?
| Option | Pros | Cons |
|---|---|---|
| Unity WebGL | Powerful editor, familiar workflow | Large download, heavy in mobile browsers |
| Babylon.js | Game-focused, comprehensive | Bigger library |
| Three.js | Lightweight, flexible, huge community | Not a game engine; you build many systems yourself |
Fast loading was my top criterion. With Three.js, the first screen can open in a few hundred kilobytes.
Scene architecture
I split the game into three parts:
- World: Ground grid, fields, buildings. Each field is a data object; its visuals are generated from that data.
- Game loop: Crop growth times, harvests, economy. Pure logic, fully independent of visuals.
- Interface: Menus and buttons in HTML/CSS, layered over the 3D scene.
Separating logic from visuals made testing easier and made it simple to add new city packs.
Performance: 6 rules for 60 FPS
- Use instancing. Hundreds of the same crop? One
InstancedMesh, not a mesh each. - Watch draw calls. Merge materials and atlas your textures.
- Cap the pixel ratio. On high-density phones, capping
devicePixelRatioat 1.5–2 makes a big difference. - Be smart with shadows. Dynamic shadows are expensive; bake them into textures for static objects.
- Don't draw what isn't visible. Pause the render loop when the tab is in the background.
- Reuse objects. Creating new vectors/objects every frame stresses the garbage collector and causes stutters.
Mobile support
On mobile, touch controls, small screens and limited GPUs are three separate problems. Locking the camera to a constrained angle instead of free roam made controls easier and reduced what needed drawing. Keeping buttons at least 44px and placing frequent actions in the thumb zone also improved playability a lot.
Player saves and an admin panel
I used a lightweight PHP API with SQLite to save player progress. I also built an admin panel where I can change city packs and economy settings without writing code. Separating game settings from code cut live balance changes down to minutes.
The bridge between game dev and marketing
The progress, reward and return loops I use in game development are exactly the retention mechanics of marketing. I go deeper in gamification in marketing.
A browser game's best feature isn't graphics, it's the link: every shared link is a new player who skipped an install screen.
Frequently Asked Questions
Is Three.js a game engine?
No, it's a 3D rendering library. You add engine features like physics, audio and scene management with extra libraries or your own code.
Do Three.js games run on mobile?
Yes. With the right optimisations (instancing, capped pixel ratio, simple shadows) they run smoothly on modern phones.
Does a browser game need a backend?
Not for single-player games without saves. For saves, leaderboards or multiplayer, a lightweight API is enough.


