2D Game Engine
University Project

About this project
Custom built game engine made with SDL 2. It features a Hybrid ECS similar to Unity's and a terraria inspired tilemap system. Part of my C++ course at Stockholm University, we were tasked with creating a custom game engine with 2D-graphics using SDL 2.
Core Components
- BoxCollider2D
For collision detection
- CharacterController2D
For character movement and control
- InputHandler
Raw or smoothed input calculated with lerp function
- Rigidbody2D
With basic physics simulation
Rendering Components
- Sprite
With color, alpha and blend mode modulation
- Text
With color and custom font support
- TileMap
With bitmasking, basic lighting, and terrain generation
- Transform
For positioning and transforming entities
Closing thoughts
This has been a very fun project to learn with, this was my first project in C++ that wasn't plain algorithms or console based. I indirectly learnt a lot about Unity while researching how to make my project's Hybrid Entity Component System. I learnt the way Unity handles entities (game objects) which contain components (scripts).
It would be interesting to expand upon this project when I have more time with a GUI, like a "Mini 2D Unity".
