Skip to content

C++ game-engine interface abstraction for graphics API such as SFML, DirectX to build graphics rendering engine architecture modular design cross-platform.

Notifications You must be signed in to change notification settings

MoAgilah/EngineInterface

Repository files navigation

EngineInterface

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.


Why?

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.


Features (current & planned)

  • 🔌 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.


Repository layout

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

Getting started

1) Add as a submodule

git submodule add https://github.com/MoAgilah/EngineInterface external/EngineInterface
git commit -m "Add EngineInterface submodule"

👤 Author

Mohamed Agilah
🎓 Games Programmer & AI Developer
🌐 Portfolio Website
📧 Contact: agilahmohamed@gmail.com

About

C++ game-engine interface abstraction for graphics API such as SFML, DirectX to build graphics rendering engine architecture modular design cross-platform.

Topics

Resources

Stars

Watchers

Forks

Languages