Planet Blupi is the original source code of the classic 1997 strategy/adventure game of the same name, developed by Epsitec SA. The original Windows/DirectX codebase has been made buildable and portable across Linux, and Web (Emscripten), using the Free Direct and Free API compatibility layers.
The game is playable on Linux and is being ported to the browser via Emscripten. Desktop builds are stable. The Web build is functional but some features (MIDI music, AVI movies) are not yet supported in the browser.
- C++
- SDL3 (via vendored submodules)
- Free Direct (DirectDraw/DirectSound compatibility layer)
- Free API (Win32 API compatibility layer)
- CMake
- Emscripten (for Web/browser builds)
- Build and run on Linux
- Add Web/Emscripten build support
- Restore MIDI music playback in the Web build
- Restore AVI movie playback in the Web build
- Investigate Android support
After cloning the repository, initialize and update submodules:
git submodule update --init --recursiveThis project vendors SDL via git submodules under third_party/:
third_party/SDLthird_party/SDL_imagethird_party/SDL_mixer
Place the original game asset directories in the repository root:
data/image/sound/movie/
These directories are expected by the game at runtime.
git submodule update --init --recursive
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
./build/bin/PLANET_BLUPI_WINDOWSFirst, install and activate the Emscripten SDK:
source /path/to/emsdk/emsdk_env.shThen configure, build, and run:
emcmake cmake -S . -B build-web -DCMAKE_BUILD_TYPE=Release
cmake --build build-web -j
emrun build-web/bin/PLANET_BLUPI_WINDOWS.htmlOr use the provided scripts:
bash scripts/build-web.sh
bash scripts/run-web.shGame assets (data/, image/, sound/, movie/) are preloaded from the repository root into the Emscripten virtual filesystem at build time — no manual copying is required.
User config and save-game data are stored in the browser's IndexedDB (via Emscripten IDBFS) and persist across page reloads. Clearing browser site data resets persistence.
Export and import save data from the browser console:
// Flush in-memory save data to IndexedDB
Module.ccall('PlanetBlupi_ExportPersistentData', null, [], []);
// Restore save data from IndexedDB into the virtual filesystem
Module.ccall('PlanetBlupi_ImportPersistentData', null, [], []);- MIDI music: MCI-based MIDI playback does not work in Web builds. The game starts without music in the browser.
- AVI movies: MCI-based video playback does not work in Web builds. Cinematic sequences are skipped gracefully.
- ASYNCIFY overhead: The Web build uses Emscripten ASYNCIFY to support the blocking Win32 message loop. This roughly doubles the
.wasmfile size compared to a non-ASYNCIFY build.
Planet Blupi is the original game by Epsitec SA. This repository contains the source code as released or made available by the original authors, adapted for modern build systems and portability.