Skip to content
C++17 · 2D · Native + WebAssembly

Shadow Engine

Build 2D games fast. Keep the engine understandable.

Shadow is a compact C++17 game engine built on SDL2, Box2D, and SDL_mixer. It combines grid gameplay, physics, audio, rendering, UI, WebAssembly builds, and a first-class interface for agent-driven games without burying the game loop under a large framework.

Shadow Engine eclipse mark
SDL2windowing · input · rendering
Box2Dphysics · contacts · worlds
Game2Dgrid · entities · UI
WASMbrowser builds · demos

One engine surface

The native loop, grid framework, rendering, audio, physics, examples, and agent-facing state model all live in the same codebase. Start small and reach lower-level systems only when the game needs them.

Read the architecture

Game2D

A high-level grid game framework with entities, input bindings, UI helpers, delta-time updates, and automatic rendering.

Native + Web

Build on macOS, Linux, and Windows, then export games and examples to WebAssembly with Emscripten.

LLM-playable

Expose game state as text or JSON, register named actions, and let an LLM or any other agent operate the same game interface.

Batteries included

Box2D physics, SDL_mixer audio, sprites, tile maps, particles, UI, procedural systems, post effects, and a large runnable example catalog.

A game in one file

#include "Engine/Core/Game2D.h"

class MyGame : public Game2D {
public:
    MyGame() : Game2D("My Game", 800, 600, 20) {}

    void initGame() override {
        createGrid(40, 30, 20);

        player = createEntity<GridEntity>(getGrid(), 5, 5);
        player->setColor({0, 200, 255, 255});

        bindKey(KEY_UP).onPress([this]{ player->tryMove(0, -1); });
        bindKey(KEY_DOWN).onPress([this]{ player->tryMove(0, 1); });
        bindKey(KEY_LEFT).onPress([this]{ player->tryMove(-1, 0); });
        bindKey(KEY_RIGHT).onPress([this]{ player->tryMove(1, 0); });
    }

private:
    std::shared_ptr<GridEntity> player;
};

int main() {
    MyGame game;
    game.run();
}

Where to go next

See it first

Open the Demo Gallery for a visual tour of real rendering, simulation, physics, AI, audio, performance, and complete game examples.

Build something

Start with Getting Started, then use the Game Development Guide for the shipped game workflow.

Understand the engine

Read Architecture, the Engine API, and the LLM Interface for the system-level view.