Getting Started¶
Shadow Engine targets C++17 and currently supports macOS, Linux, Windows, and WebAssembly.
Install dependencies¶
Windows builds can use the vendored dependency configuration exposed by the repository's CMake setup.
Build the engine¶
Run the default demo:
Run one of the shipped examples:
./build/snake_example
./build/minesweeper_example
./build/tictactoe_example
./build/roguelike_example
Create a game¶
The fastest path is the repository's game scaffold:
make new-game creates a complete game under Games/Pong/. Game directories are auto-registered by the CMake setup, so a new game does not need manual build wiring.
For the full workflow, continue to the Game Development Guide.
Minimal Game2D program¶
#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();
}
Game2D is the recommended entry point for grid-based games. It owns the grid layer, entity list, input shortcuts, UI helpers, delta-time game loop, and the LLMPlayable interface.
Run tests¶
The repository also contains sanitizer, smoke, layout, example-registration, and platform-specific CI coverage. See Build & Test for the complete matrix.
Build for WebAssembly¶
With Emscripten configured:
Or use the repository helper to build the browser catalog:
A single shipped game can be exported with: