A small 2D mini game built in C++ using SFML 2, focused on smooth gameplay, animations, collisions, UI elements, and game states.
This project was created to improve game development skills in:
- Object-Oriented Programming (OOP)
- SFML graphics and audio
- Collision detection
- Sprite animation
- Game loop architecture
- Asset management
- 🎯 Smooth player movement
- 🏃 Running, crouching, sliding animations
- ❤️ Health bar / hearts system
- ⏱️ Timer system
- 🎵 Background music and sound effects
- 💥 Damage and game-over effects
- 🖼️ Multiple backgrounds
- 🧱 Clean
src+assetsproject structure - 🛠️ Easy build script
miniGame_cpp/
│
├── assets/ # Images, sprites, sounds, fonts
│ ├── imgs/
│ ├── sounds/
│ └── fonts/
│
├── src/ # Game classes
│ ├── Game.hpp / .cpp
│ ├── Player.hpp / .cpp
│ ├── Obstacle.hpp / .cpp
│ ├── Heart.hpp / .cpp
│ ├── Timer.hpp / .cpp
│ └── ...
│
├── main.cpp
├── build.sh # Build script
└── README.md| Key | Action |
|---|---|
A / D |
Move left / right |
Space |
Jump |
C |
Crouch |
P |
Pause |
Esc |
Exit |
git clone https://github.com/SaouiYassir/miniGame_cpp.git
cd miniGame_cppchmod +x build.sh
./build.sh./gameMake sure you have:
- C++17 or newer
- SFML 2.5+
- g++
- Linux / macOS / Windows (MinGW)
sudo apt install libsfml-devThis project helped improve my understanding of:
- Game architecture
- Class separation
- Delta time movement
- Sprite sheets
- SFML event handling
- Resource loading
- GitHub collaboration workflow
Yassir Saoui
C++ / Game Development / SFML
- GitHub: https://github.com/SaouiYassir
- LinkedIn : https://www.linkedin.com/in/yassir-saoui/
Aymane Hamouch
C++ / Game Development / SFML
- GitHub: https://github.com/aymanehamouch05
- LinkedIn : https://www.linkedin.com/in/hamouchaymane/
If you like this project, give it a star ⭐ and feel free to contribute.