> Sail a dragon-prowed junk through a lantern-lit harbour at dusk – together with everyone on the page. Five quests, pirate sea battles and live multiplayer in a real-time 3D game built from scratch with three.js and WebGL.
>
> Web page: https://balazscsorba.com/game · Language: English · Also available in: [Deutsch](https://balazscsorba.com/de/game.md) · [Magyar](https://balazscsorba.com/hu/game.md)

Playground

# **Dragon Voyage**

A small real-time 3D game that runs right here in your browser – and everyone on this page right now sails in the same harbour. Light the floating lanterns, race through the torii gates, rescue castaways and fight off a pirate fleet together, aboard a junk with a golden dragon figurehead.

-   three.js · WebGL
-   Live multiplayer
-   5 quests · pirate fleet
-   0 image or model files
-   Keyboard, mouse and touch

How it's made

## Everything you see is generated in code

There are no downloaded models, textures or sounds. The whole harbour – water, mountains, town, ships, pirates and dragon – is built by about 7,000 lines of TypeScript and GLSL when the scene loads.

-   ### Native in the browser

    Built with three.js on WebGL instead of a Unity or Unreal export: no plugin, no multi-megabyte runtime, loaded only when you open this page.

-   ### One shared harbour

    A tiny dependency-free WebSocket relay puts everyone on the page into the same session. The longest-connected player hosts the quests and the pirate AI; ships, cannon fire and progress are synchronised about ten times a second, and the game falls back to solo play when offline.

-   ### Physically based ocean

    Six Gerstner waves run identically on the GPU and the CPU, so the ship pitches and rolls on exactly the waves you see. Sky and mountain reflections, fresnel, foam and lantern glitter are computed per pixel.

-   ### Procedural world

    Noise functions shape the bay, the ridged mountains and the islets; five thousand instanced pines, a terraced town with glowing windows and a five-tier pagoda are placed by rules, not by hand.

-   ### A living ship

    The junk's hull is lofted from mathematical sections. Its battened sails are cloth meshes that billow to leeward and reef as you lower them, and the golden dragon is sculpted from curves and scale textures painted on a canvas.

-   ### Cinematic image

    An HDR pipeline with image-based lighting from the dusk sky, bloom on every lantern, ACES tone mapping, aerial perspective that melts into the sunset, a vignette and film grain.

-   ### Built to run smoothly

    Adaptive resolution holds the frame rate, the game pauses when it scrolls out of view or the tab is hidden, and every GPU resource is released when you leave the page.

Built in an agentic workflow with Claude Code as AI pair programmer – the same way I build production software.
