[Mirror] Libreopolis is a cross-platform city simulation game fully compatible with SimCity 2000. gitlab.com/conasg/libreopolis
README.md

Libreopolis #

A city simulation that opens your old .SC2 cities.

A dense city in Libreopolis — the isometric map with the tool palette, minimap and status bar

Before you lies a working city simulation game — the simulation itself, an isometric renderer, disasters, budget, and the map editor. It reads and writes real .SC2 files, so a city you saved back in the day opens here and keeps playing, and a city you build here should (in theory) load back into the real thing.

None of the original game is in this repository. You bring your own copy, and a small script pulls the required assets out of it into a local folder. Everything in the repo is original code and assets.

Why this exists #

When I was a kid, I played so much of the original, but I hadn't touched it in years. Then one day I got curious about how it actually worked underneath. As always, the curiosity got out of hand. This is where it ended up: a whole engine that behaves like the one I remember, rebuilt in modern C++ with SDL3.

Each system is reconstructed from the way the original behaves, and checked against it wherever the numbers could be pinned down. The tax model, the way pollution and land value creep across the map, the three separate random number generators, the fact that a new power plant fills its grid one tile per tick — it's all rebuilt to match.

Getting started #

You'll need a C++20 compiler, Python 3, SDL3, and your own copy of the original game — specifically the Windows 95 Special Edition. Be aware that the version commonly sold today is the DOS release, which won't work here. You might need to dig around on Archive.org, or if you're lucky, maybe you've still got the disks.

# pull the art and sounds out of your game install
python3 extract_assets.py /path/to/SC2K # the folder with SIMCITY.EXE in it

# build and play
make app
./build/libreopolis

make test runs the test suite on its own, with nothing but a compiler. For SDL, it's brew install sdl3 sdl3_mixer on macOS, or SDL3 from your package manager on Linux.

Your cities load straight from the game install; set SC2K_DATA_DIR to read them from somewhere else. For music, drop a General MIDI soundfont into assets/soundfonts/ (the free GeneralUser GS sounds great), and if you don't, it'll try to find one already on your system.

What works #

Most of the game, and I'm filling in the gaps as I find them. Zoning and growth, the whole economy of tax, budget, bonds and ordinances, the power and water networks, police and fire, the disasters, weather, newspapers (kind of), inventions and rewards, military, scenarios, the map editor. The interface is reworked, because the original is quite mediocre by modern standards (now we've got pinch-to-zoom, for example). The sound effects and MIDI soundtrack play.

The idea is that it feels a lot like the game you remember, so mostly it just does. Whatever's still rough is in my personal issue tracker, and you're more than welcome to open issues here.

How close to the original is it? #

Getting that right is the whole point, so it goes a long way. The RNG is the same as the original, power and water networks match saved cities tile for tile, and land value, crime, pollution and traffic are validated against real cities made in the original game.

That being said, it does deviate on purpose to fix bugs, add quality-of-life improvements, and modernise the user interface, and there will be further changes, but they will all be additive, and you'll still always be able to open an old SC2 file and play the cities you remember.

If you want to lend a hand, have a look at CONTRIBUTING.md.

Libreopolis is an independent project. It is not affiliated with, endorsed by, or associated with the makers or publishers of the original game.

The repository intentionally contains none of that game's code, art, sound or data. It's original code that reproduces the game's behaviour, written for interoperability with its file formats. You need your own lawfully obtained copy to play, and the extraction scripts read from that copy into a local folder on your machine.

The code is under the GNU GPL v3, which covers this implementation alone and grants no rights to any other game. If you're a rights holder with a concern, please open an issue and I'll respond quickly.