Talon Engine is a lightweight, modular 2D game engine written in C++ using SDL2. Inspired by Unity, designed from scratch, and built with pure muscle.
-
GameObject + Component System Inspired by Unity, every object is modular, dynamic, and follows a clean lifecycle:
Awake(),Start(),Update(). -
Input System Handles real-time keyboard input (WASD, spacebar, Shift) using SDL2's raw scancodes.
-
Animator with Frame Events Spritesheet-based animation with timing control, direction switching, and frame-triggered callbacks (
std::functionper frame). -
SpriteRenderer Renders sprites with
SetSourceRect()support for pixel-perfect control over frames and spritesheets. -
Rigidbody2D Physics
- Gravity, drag, velocity, acceleration
AddForce()andApplyImpulse()- Fully frame-based physics update with jump support
-
BoxCollider Collision detection with offset support, overlap handling.
-
CollisionManager Handles collision resolution and prediction before applying movement.
-
Vector2 Math Library Clean utility methods like
Normalize(),Length(),Dot(), and operator overloads. -
Folder-based project layout Organized includes, systems, and components — Visual Studio–friendly.
-
Built From Scratch No engine templates, no frameworks — just pure C++ and SDL2.
-
Editor UI with ImGui
- Dockable panels: Hierarchy, Inspector, Console, Scene
- Right-click context menus (rename, delete, duplicate, drag & drop parenting)
- Live editing of GameObject properties and components
- Log filtering, search, and source-file trace with timestamps
-
Component System with Custom Scripting
- Base
MindCoresystem with full lifecycle (Awake,Start,Update,OnDestroy) - Register custom user scripts using the built-in
ComponentFactory - Serialize/deserialize custom and built-in components to JSON
- Prioritized component update order
- Base
-
Scene System & JSON Serialization
- Save and load scenes to JSON
- Each GameObject has UUID + parent/child hierarchy
- Automatic component linking and factory-based creation
- Supports prefab-like behavior
-
Play/Edit Mode Switching
- Seamless toggle between editing and runtime mode
- Automatic scene state restoration after exiting Play mode
The hierarchy panel displays your scene structure in a tree view, allowing you to organize GameObjects with parent-child relationships.
Right-click on any GameObject to access options like rename, delete, duplicate, and more.
The inspector allows you to view and edit properties of selected GameObjects and their components in real-time.
Easily add new components to GameObjects through the inspector's "Add Component" menu.
The console displays log messages with filtering, timestamps, and source file information for debugging.
- 🔲 Advanced Prefab system
- 🔲 Undo/Redo system
- 🔲 Realtime profiler
- 🔲 Light/Shadow 2D support
- 🔲 Native audio system
- 🔲 Drag-and-drop parenting in hierarchy
- ✅ Component delete/duplicate from Inspector
- ✅ Scene/Game view split
- ✅ Component serialization with ComponentFactory
- ✅ RTTR-style registration for custom components (manual for now)
Custom components inherit from MindCore and are registered using:
REGISTER_COMPONENT(MyCustomScript)Then registered like this:
ComponentFactory::Instance().Register("MyCustomScript", MyCustomScript::Create);To support saving/loading, implement:
void Serialize(nlohmann::json& json) override;
void Deserialize(const nlohmann::json& json) override;- C++17 or higher
- Visual Studio (recommended)
- vcpkg
- SDL2
- Doxygen (for generating documentation)
- Graphviz (optional, for UML-style diagrams in Doxygen)
Follow these steps to build and run Talon Engine locally.
git clone https://github.com/severmanolescu/Talon.gitIf you don't have vcpkg installed yet:
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.batThen install SDL2 and SDL2-Image:
vcpkg install sdl2 sdl2-image-
Open
Talon.sln -
Go to
Project Properties > VC++ Directories -
Add:
-
Include Directories:
C:\path\to\vcpkg\installed\x64-windows\include -
Library Directories:
C:\path\to\vcpkg\installed\x64-windows\lib
-
Go to Project Properties > Linker > Input > Additional Dependencies, and add:
SDL2.lib SDL2main.lib SDL2_image.lib
C:\path\to\vcpkg\installed\x64-windows\bin next to the .exe at runtime





