A lightweight 2D game engine built in C++ using SDL2, created as a portfolio project to explore game engine architecture, gameplay systems, and custom development tools.
This project is part of a three-part development pipeline:
- MiniEngineSDL2 → the core game engine
- Level Editor Lite → a custom level editor built on top of the engine
- Top-Down Shooter Demo → a small playable game built using both
The goal is to demonstrate a complete game development workflow from engine → tools → game.
▶ Current Engine Demo:
(https://github.com/JaswinderJattana-gdev/MiniEngineSDL2/tree/main/media)
- Custom C++ 2D game engine
- Built using SDL2
- Fixed timestep update loop
- Scene system with push / pop / set transitions
- Logical resolution support
- Configurable input mapping
- Debug-friendly architecture
- SDL2 renderer wrapper
- Camera system with world-space coordinates
- Logical resolution scaling
- Debug rendering helpers
- Grid-based world visualization
- Camera follow system
- Axis-separated collision resolution
- Static obstacle collision world
- Particle system (dust effects)
- Dash mechanic with camera shake
- Debug overlays for collision visualization
- AssetManager with cached texture loading
- BMP texture support with color-key transparency
- Centralized asset access through the engine context
-
Plain-text level file format
-
Level loading and saving through
LevelIO -
Level data includes:
-
world size
-
player spawn position
-
obstacle rectangles
Example level format:
WORLD 4000 4000
PLAYER_SPAWN 200 200
OBSTACLE 500 300 140 80
OBSTACLE 900 700 220 60
OBSTACLE 1300 1000 100 260
This format will later be generated by the Level Editor Lite tool.
The engine is organized into modular systems:
Engine
├── Renderer
├── Input / InputMap
├── SceneManager
├── AssetManager
├── CollisionWorld2D
├── ParticleSystem2D
├── Camera2D
├── WorldRender2D
└── LevelIO / LevelData
Scenes receive an EngineContext that provides access to shared engine systems such as:
- renderer
- input mapping
- asset manager
- window information
- engine configuration
This keeps systems modular while allowing easy access when needed.
MiniEngineSDL2
│
├─ engine/
│ ├─ Engine
│ ├─ Renderer
│ ├─ SceneManager
│ ├─ AssetManager
│ ├─ CollisionWorld2D
│ ├─ ParticleSystem2D
│ ├─ Camera2D
│ ├─ WorldRender2D
│ ├─ LevelIO / LevelData
│ └─ utilities
│
├─ game/
│ ├─ MenuScene
│ ├─ DemoScene
│ └─ PauseScene
│
├─ assets/
│ ├─ sprites
│ └─ levels
│
└─ CMakeLists.txt
| Key | Action |
|---|---|
| W / A / S / D | Move |
| Arrow Keys | Move |
| Shift | Dash |
| Space | Fire |
| P | Pause |
| ESC | Return to Menu |
| F1 | Toggle Debug Overlay |
- C++17
- SDL2
- CMake
- Visual Studio
- vcpkg
The engine intentionally avoids heavy frameworks to focus on core engine systems and architecture.
- C++17 compatible compiler
- CMake
- SDL2
- vcpkg (recommended)
git clone https://github.com/JaswinderJattana-gdev/MiniEngineSDL2.git
cd MiniEngineSDL2
cmake -B build
cmake --build buildRun the executable produced in the build directory.
Current progress:
- Engine core systems
- Scene manager
- Collision world
- Particle system
- Level file format
- Asset manager
- Camera and rendering helpers
Planned additions:
- Shooter gameplay systems
- Bullet system
- Enemy AI
- Level editor tool
- Interactive level creation
- One fully playable level
Build a complete mini game development pipeline:
MiniEngineSDL2
↓
Level Editor Lite
↓
Top-Down Shooter Demo
The final project demonstrates:
- engine architecture
- custom development tools
- gameplay implementation
- asset pipeline integration
Jaswinder Singh
Applied Computer Science Student
Interested in game development, engine architecture, and technical systems.
GitHub:
https://github.com/JaswinderJattana-gdev