← Back

Settlers.ts

A browser-based game engine for The Settlers 4, with the full economy and logistics. Playable with your own copy of the original game files.

Kind
Software
Status
published
Stack
  • TypeScript
  • WebGL2
  • Vue 3

A browser remake of The Settlers 4, the 2001 Blue Byte real-time strategy game, running in WebGL2 with the player's own legally owned game files.

Settlers.ts in game: a Roman settlement with a sawmill, a guard tower, soldiers and carriers, beside the build menu

Settlers.ts rendering the first Roman campaign map from the original game files. The Settlers 4 © Ubisoft / Blue Byte.

Settlers.ts start screen with Game Mode and Dev Mode

The game's graphics, archives, maps, and savegames are decoded in the browser from the player's own copy.

The project is a fork of tomsoftware/Settlers.ts, which supplied the original file-format readers and the WebGL map rendering the remake builds on.

How it's built

Entities are plain data, and systems update them on a fixed tick, roughly in ECS style. Changes from the UI, the AI, and scripts all go through one typed command bus.

What works

Rendering

WebGL2, palette on the GPU

Hex-grid terrain with height maps, rivers, and fog-of-war. Sprites keep the game's original palette and are coloured on the GPU, per player. Decoding runs in parallel in Web Workers and is cached between visits.

Economy

Full production chains

Wood and boards, stone, grain to flour to bread, hunting, fishing, ranching, mining, smelting, and tool and weapon smiths. A logistics dispatcher matches requests to supplies.

Combat

Soldiers, towers, territory

Swordsmen and bowmen, guard towers and castles with garrisons, territory, and a last-player-standing win.

World

Growth and depletion

Forests grow and spread, stone depletes in stages, crops grow and decay, and geologists sweep mountains for ore that mines then use up.

All five races, Roman, Viking, Mayan, Dark Tribe, and Trojan, are playable in sandbox, each with its own buildings, units, and production chains.

Not there yet

  • Ships and naval transport, war machines, magic and priests.
  • AI opponents and multiplayer.
  • Integrated sound effects and an in-browser map editor.