EnTT Dino is a clone of the Dinosaur Game built using only SDL2 and the EnTT entity component system library.
The motivation behind this project is to gain experience with the foundational features of a game engine, such as rendering, resource management, and state handling, while giving the entity component system (ECS) paradigm a thorough test in a real-world scenario.
By using just SDL2 and EnTT, the project remains lightweight and focused, allowing for a deeper understanding of how these systems interact and how to build up game engine features from scratch.
- Entity Manager: EnTT-based, fast and flexible ECS.
- Resource Manager: Handles loading and caching of fonts, sprites, and sounds.
- Scene Manager: Supports multiple scenes and transitions.
- State System: Clean separation of game states (running, jumping, ducking, dead, etc).
- HUD System: Displays score, high score, and game over screen.
- Event System: Decoupled event dispatching for game logic.
- Running, Jumping, Ducking: Responsive dino controls.
- High Scores: Persistent high score tracking.
- Cactii & Pterodactyl Enemies: Multiple enemy types with collision detection.
- Incremental Difficulty: Game speed and spawn rates increase as you score points.
- Night Mode: Dynamic background transitions and moon/stars.
- Sound Effects: Jump, death, and other game sounds.
- Animated Sprites: Dino, pterodactyl, ducking, and stars are animated.
- Score Flashing: Score flashes every 100 points.
- Parallax Background: Clouds, moon, and stars move at different speeds.
- FPS Counter: Real-time frames-per-second display in the HUD.
- CMake version 3.7 or later.
- SDL2, SDL2_image for input and rendering, SDL2_ttf for fonts and SDL2_mixer for sounds.
To install these on Arch Linux
:
sudo pacman -S cmake sdl2 sdl2_image sdl2_ttf sdl2_mixer
For other platforms and distributions please refer to your package manager's documentation or visit the official installation instructions.
To build simply run:
cd build/
cmake ..
make
The resultant entt_dino
executable can then be found in bin/
.
Copyright (c) 2025 Tobias Backer Dirks.
Code released under the MIT licence.