DreamEngine

A lightweight, modular 2D game engine built in modern C++.

Dream freely, build deliberately.

Let the engine run the loop.

Implement the scene’s hooks for input, updates, and drawing, then queue it with SceneManager. DreamEngine polls for events, measures the time between frames, and presents the finished frame.

Define how your game behaves.

In a survey scene, a scan reveals nearby signals and spends ten units of charge. You decide when a scan succeeds. The scene passes its updates and draw calls to a BarView, which draws the remaining charge and animates the trailing edge.

The scene declares its meter as BarView charge{100}. Its public fields control the fill color, outline width, and trailing delay.

void SurveyScene::onEntry() {
    charge.foregroundColor = Color("#91D8C8");
    charge.outlineWidth = 2;
}

void SurveyScene::scan() {
    if (charge.currentProgress < 10) return;
    charge.currentProgress -= 10;
    revealNearbySignals();
}

Engine components

Game Demo

Revenants brings DreamEngine’s features together in a duel with the Ember Lord. The camera follows the swordsman, and each swing that connects takes a bite out of the boss’s health bar.

Next steps

I want to keep building components I can carry from one game to the next. A track-based AudioMixer would let a game fade the music while keeping sound effects at full volume. I’d like to add reusable UI views for menus and dialogue, support serialization so a scene can save and restore its state, and give games more control over how sprites, effects, and UI are drawn together in the rendering pipeline.