About this port
This is a browser port of The Settlers II: a from-scratch TypeScript reimplementation of the game's rules, rendered with WebGL, that runs in a normal browser tab. There is nothing to install and nothing to configure — you open the page, pick a map and a nation, and the settlement starts.
What it is built on
The behavioural reference is Return to the Roots (s25client), the long-running open-source continuation of the original engine. Its documentation of the world model, the graphics pipeline and the economy is what this port is measured against; the source cites it section by section, so a rule that behaves oddly here can always be traced back to the rule it was meant to copy.
Three pieces sit underneath everything else:
- The parsers. The original game's archive formats — LST containers, BOB sprite sets, the four bitmap codecs, palettes, fonts, and the SWD/WLD map container — are decoded in TypeScript, in the browser, into a texture atlas that is cached so the second visit starts immediately.
- The simulation. All game state advances in 50 ms game frames. Nothing in
it reads the wall clock or
Math.random; randomness comes from a seeded generator that reproduces the reference implementation's test vectors exactly. The same map, seed and frame count always produce the same checksum, which is what makes saves, replays and online play possible at all. - The renderer. Terrain is one mesh with an animated palette-cycled texture; everything above it — buildings, workers, trees, flags, fog of war — is drawn from the atlas in the original's own draw order.
What it is not
This project does not ship the original game's graphics, sounds or maps. Those are copyrighted by Blue Byte / Ubisoft. The game host supplies a compatible asset pack, and the repository's setup script unpacks the freely redistributable Settlers II demo for local development.
It is also not an emulator. No original code runs here; the rules were re-implemented, and where this port deliberately departs from the original that departure is written down next to the code that makes it.
The code
The port is open source under the GPL-2.0-or-later, the same licence the
reference engine uses. The docs/ directory in the repository is the honest
statement of what is implemented and what is not — including the subsystems
that exist and pass tests but are not yet reachable from a running game.