OpenEmperor is a clean-room reimplementation of Emperor: Rise of the Middle Kingdom, currently targeting native macOS on Apple Silicon. It reads the original game files supplied by the player; original assets and decoded images are never bundled.
The current development version is 0.1.0-alpha.2. It offers an OpenEmperor-authored city sandbox, not the original campaigns, economy or savegame compatibility. See known issues for the remaining limits and documentation for the maintained guides.
Install Xcode Command Line Tools, CMake and OpenSSL 3. CMake uses system zlib and either an installed compatible nlohmann/json or its pinned dependency. The default SDL3 dependency is fetched at a pinned revision; for an installed SDL3 3.4.10 or newer, add -DOPENEMPEROR_USE_SYSTEM_SDL3=ON.
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=arm64
cmake --build build --parallel
./build/openemperorReuse the same build directory for subsequent builds. On first launch, select an installed or extracted Emperor data directory, rather than the GOG installer file. Choose New Sandbox, a supported map and a rules profile. The prepared settlement is built with ordinary paid commands at tick zero.
The general menu default remains City-v11 rule 3. Selecting City-v16 starts rule 4 with original ground roads; Bridges rule 5 and Ramps rule 6 are explicit choices. Loading an existing save preserves its profile and rule version.
Start City-v16 directly:
./build/openemperor --data /path/to/emperor \
--sandbox Cities/Xia.map --sandbox-rules sandbox-city-v16 --sandbox-demoFor the latest isolated/adjacent ramp graphics test with local extracted data:
sh tools/test_multi_ramp_visuals.sh .local/gog-extracted/appThat starter builds current Release, creates disposable authored terrain and opens a normal paid four-ramp city. See ramp presentation for software captures and regression modes. The original ramp asset audit separates verified original sprite identities from authored-link rendering and records the remaining native-fit limit.
The city includes Food and Pottery production, Markets, Service visits, population and workforce controls, fire safety, desirability, water, health, taxes and maintenance. City systems explains their shared rules; City-v16 covers upkeep and current rule versions. The sandbox guide also records older selectable profiles and save compatibility.
- Space pauses or resumes; . advances one paused tick.
- WASD/arrows pan; the mouse wheel zooms; Z cycles 1x/2x/4x; R refits.
- F5/F9 save/load; Escape/Menu retains a menu-managed session for Resume.
- Help lists the current profile's building tools and controls.
- F1 shows diagnostics; F6 compares road materials. These controls change presentation only.
Manual saves, settings and bounded recovery history use SDL's per-user preference directory, usually ~/Library/Application Support/OpenEmperor/OpenEmperor/ on macOS. Original game data stays read-only. Recovery loads a separate branch; older profiles and schemas are not silently upgraded. Explicit City-v11 copy upgrades preserve their source saves.
One exactly fingerprinted GOG-derived asset set automatically enables compatible walker, building and road metadata. Other versions retain presentation fallbacks; custom visual JSON profiles remain optional session overrides. Exact recognition is not a claim of original-game visual fidelity.
ctest --test-dir build --output-on-failure
# Build and verify a local arm64 app and ZIP.
sh tools/package_macos.sh
open dist/OpenEmperor.appPackaging uses build-macos-app/ and writes the bundle, ZIP, checksums and report to dist/. It requires installed SDL3, OpenSSL 3 and nlohmann/json. The local app is ad-hoc signed, without Developer ID signing or notarization.
Testing documents Debug/sanitizer, endurance, original-data and manual checks. macOS packaging covers bundle verification. Automated checks, native input delivery and human gameplay acceptance are separate results.
./build/openemperor --data /path/to/emperor --browse-assets
./build/openemperor-inspect /path/to/file.sg3 --summary
./build/openemperor-map-inspect --data /path/to/emperor --list --json
./build/openemperor --data /path/to/emperor --map-debug Cities/Xia.mapUse the relevant guide for advanced modes:
- Architecture and scene manifests.
- Stored map graphics, terrain bindings and map playability.
- Visual profiles, road materials and walker profiles.
- Reverse-engineering evidence, including map format and graphics IDs.
Reverse-engineering notes distinguish observed source facts, supported interpretation and authored preview behavior. A successful saved-map render does not prove original first-draw composition or gameplay parity. Historical published release notes remain under releases.