◍ Open-source city simulator
The city simulator
you grew up with,
rebuilt in the open.
Libreopolis is an open-source city simulator, reconstructed
from the original SimCity 2000 and rebuilt
in modern C++.
It reads and writes real .SC2 save files, so cities you built years ago load straight
in and keep playing.
You supply the assets from your own copy of the game. Everything in the repository is original code.
▚ The interface
Familiar on the surface, reworked underneath.
The game isn't frozen in 1993, and it keeps changing. A minimap has been added, and there's smooth pinch-to-zoom and panning. The aim is the feel of the original, but a more modern look.
.SC2 save, running in Libreopolis.▤ Feature coverage
Most of the game, rebuilt to match.
Each system was reconstructed from how the original behaves, with various things checked against the original to help pin them down.
-
RCI
Zoning & growth
Residential, commercial and industrial demand rise and fall on the original model, down to how a plot upgrades one class at a time.
-
$
The whole economy
Tax, budget, bonds and ordinances. Pollution and land value creep across the map the way they always did.
-
⚡
Power & water
Grids fill one tile per tick. Cut a line and the lights go out downstream, on the next edit.
-
◈
Police, fire & disasters
Coverage, dispatch, and the full cast of trouble: fire, floods, riots, tornadoes, the air crash, and the monster.
-
☂
Weather & the newspaper
A seasonal weather model, and a newspaper that writes its own headlines from what just happened in town.
-
◇
Inventions & rewards
The year-gated tech tree, the reward buildings that unlock with it, and the military bases.
-
▶
Scenarios
The built-in scenarios play through, scripted disasters and win conditions and all.
-
⛰
The map editor
Terrain generation ported faithfully, plus the full Edit New Map toolset of brushes and sea level.
-
◐
A modern interface
Reworked for today: pinch-to-zoom, smooth panning, a proper minimap. It still feels like the game you remember.
-
.SC2
Real save files
Open a city from the original and it loads. Save one here and it should load back into the real thing.
-
♪
Sound & music
The sound effects play, and the MIDI soundtrack runs through your own General MIDI soundfont.
-
…
And the gaps are closing
Whatever's still rough is being tracked. Issues and patches are welcome.
❯ Getting started
Bring your own assets. Build the game.
The repository is all original code, with none of the game's art, sound or data. You install SDL3 and Python 3, extract the assets from your own copy of the game, then build. A C++17 compiler handles the rest.
Music is optional: drop a General MIDI soundfont into
assets/soundfonts/ and the soundtrack plays.
make test runs the whole suite with nothing but a compiler.
# get the code
$ git clone https://tangled.org/conasg.com/libreopolis
$ cd libreopolis
# install SDL3 (brew on macOS, apt/pacman on Linux)
$ brew install sdl3 sdl3_mixer
# pull the art and sound from your own copy of the game
$ python3 extract_assets.py /path/to/SC2K
# build and play
$ make app
$ ./build/libreopolis
◍ Why it exists
As a kid I played so much SimCity 2000. Years later I got curious about how it actually worked underneath, and the curiosity got out of hand. This is where it ended up: a whole engine, worked out from the binary one function at a time, and rebuilt so it feels like the game you remember.Read the code