Skip to content

A Dinosaur Game clone using the Entity Component System (ECS) from the EnTT library.

License

Notifications You must be signed in to change notification settings

omgitsaheadcrab/entt_dino

Repository files navigation

EnTT Dino

EnTT Dino Logo

MITLicensed Build status

Introduction

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.

EnTT Dino Demo

Engine Features

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

Game Features

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

Dependencies

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.

Building

To build simply run:

cd build/
cmake ..
make

The resultant entt_dino executable can then be found in bin/.

Licence

Copyright (c) 2025 Tobias Backer Dirks.

Code released under the MIT licence.

About

A Dinosaur Game clone using the Entity Component System (ECS) from the EnTT library.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors 2

  •  
  •