A lightweight, reusable C++ interface layer for game/visual apps that lets you plug in different graphics/audio/input backends (e.g., SFML, DirectX, etc.) without changing game code.
Decouple your game/application logic from any specific multimedia library. Write to a stable set of C++ interfaces once; swap the backend later (SFML β DirectX, mock β headless tests) with minimal churn.
- π Backend-agnostic: implement once per backend (e.g., SFML)
- π§ͺ Testability: provide mock implementations for unit tests
- π§° Gradual adoption: start with one backend, keep the same game code
- π¦ Simple integration: add as a Git submodule and include the headers
A reference backend using SFML lives in a separate repo: SFMLEngine.
EngineInterface/
ββ Code/ # Header-only or headers+minimal sources for the interfaces
ββ Resources/ # Any shared assets/helpers for samples or tests
ββ README.md
The exact headers may evolve, but the design aims to model:
IWindow,IRenderer/IGraphicsContext- Drawable/resource abstractions (
ITexture,ISprite,IFont,IText)IInput(keyboard/mouse/gamepad),IAudio(optional)ITime/Clock,IResourceProvider
git submodule add https://github.com/MoAgilah/EngineInterface external/EngineInterface
git commit -m "Add EngineInterface submodule"
Mohamed Agilah
π Games Programmer & AI Developer
π Portfolio Website
π§ Contact: agilahmohamed@gmail.com