free-direct

A C++ reimplementation of a narrow, game-driven subset of DirectX 3 (2D),
backed internally by SDL 3. Designed to run legacy 2D games on modern platforms.

C++20 SDL 3 MIT License Work in Progress

free-direct is a compatibility shim that lets legacy DirectX 3 2D game code compile and run without any Microsoft DirectX runtime. It targets the exact subset of APIs used by games such as Speedy Blupi / Speedy Eggbert and Planet Blupi, no more and no less.

Architecture

┌───────────────────────────────────┐ │ Legacy Game / Demo Code (C++) │ │ #include <ddraw.h> / <dsound.h> │ └──────────────┬────────────────────┘ │ DirectDraw / DirectSound / DirectPlay calls ▼ ┌───────────────────────────────────┐ │ free-direct │ │ (static library, C++20) │ │ │ │ directdraw/DirectDraw.cpp │ │ directsound/DirectSound.cpp │ │ directplay/DirectPlay.cpp │ └──────────────┬────────────────────┘ │ SDL3 calls (internal detail only) ▼ ┌───────────────────────────────────┐ │ SDL 3 (+ SDL3_image, SDL3_mixer)│ │ Cross-platform: Linux / macOS / │ │ Windows / Android / Web (TODO) │ └───────────────────────────────────┘

SDL 3 is an internal implementation detail. It does not appear in any public header. Game code only sees the DirectX-shaped API.

What is implemented

ComponentStatusNotes
DirectDraw (2D) Partial Core subset implemented with SDL3 renderer and CPU pixel buffers
DirectSound Partial PCM static buffers over SDL3 audio; no looping, no 3D, no capture
DirectPlay Stub All methods are dummies that return success; no real networking
Direct3D Not supported 3D pipeline not needed by target games; will not be added
DirectInput Not implemented No header or source; input is handled by the free-api WinAPI layer

Quick links

Project status

free-direct is a work in progress. The implementation covers the subset exercised by Speedy Blupi and Planet Blupi call sites. Features not required by those games may be missing, stubbed, or only partially correct. Do not treat this as a full DirectX 3 compatibility layer.

License

free-direct is released under the MIT License. See the LICENSE file in the repository root.