LEGENDS OFELDRUVA
Language: English
EnglishPortuguêsEspañolDeutsch日本語
Play now

How a 3D multiplayer game fits in under 1 MB

Published · Updated

Legends of Eldruva is a 3D multiplayer game whose client, server and manifest add up to 340 KB. The desktop edition of the same project, built on a game engine with imported art, is about 168 MB, roughly 482 times larger. The difference comes from one decision: replace every asset with code that generates it.

Play now in your browser Play with friends

Where the megabytes went

PackageSize
Engine-based desktop build: engine, packed data and game serverabout 168 MB
Micro edition client: one HTML file328 KB
Micro edition server11961 bytes
Micro edition, everything340 KB

Most of the large build is the engine itself and imported art: models, textures and their sources. The micro edition carries none of it.

Replacing assets with code

One set of rules for client and server

The game logic, world generation and simulation are plain JavaScript files shared by the browser and the Node.js server. Every action goes to the server, which applies it with the same rules and sends it to everyone in order; each client replays it on its own copy of the world. Because the rules are deterministic, every copy stays identical without sending the world state. Every 40 commands a summary of the state is compared, and a client that drifted reloads the world.

Build

A small script concatenates the source files into one HTML page and one server module, strips comments, and fails the build if the total passes 1 MB. There are no dependencies: the server implements HTTP and WebSocket itself on Node.js.

What it costs

Questions about this

Does it use a game engine?

No. It is plain JavaScript and WebGL2.

Does it use any libraries?

No. Client and server have no dependencies.