Tried to make a clone of the OG game "Hill Climb Racing" by Fingersoft using SDL2 and C++ as a lab project for CSE-1211 course.
Hill Climb Racing is a side-scrolling racing game where players navigate challenging terrain while managing fuel and collecting coins. The game features realistic physics simulation, collision detection, and an engaging scoring system.
- Physics-based gameplay with realistic vehicle dynamics
- Collision detection system for terrain and objects
- Sound effects and background music using SDL2_mixer
- High score tracking with persistent storage
- Fuel management system with low fuel warnings
- Coin collection mechanics
- Texture management for optimized graphics rendering
- SDL2 development libraries
- SDL2_mixer for audio
- C++ compiler (GCC recommended)
- Make utility
- Clone the repository:
git clone https://github.com/mithunvoe/Hill-Climb-Racing
cd Hill-Climb-Racing- Install SDL2 dependencies (Ubuntu/Debian):
sudo apt-get install libsdl2-dev libsdl2-mixer-dev- Build the project:
makeRun the game:
./main- Arrow Keys/WASD: Control vehicle movement
- Space: Brake
- ESC: Exit game
Hill-Climb-Racing/
├── Game.cpp/hpp # Main game engine and loop
├── main.cpp # Entry point
├── Collision.cpp/hpp # Collision detection system
├── TextureManager.cpp/hpp # Graphics and texture handling
├── Vector2D.cpp/hpp # 2D vector mathematics
├── highscore.cpp/hpp # Score management
├── assets/ # Game assets (sprites, sounds)
├── ECS/ # Entity Component System
└── Makefile # Build configuration
- Fuel System: Monitor fuel levels and refuel strategically
- Physics Engine: Realistic vehicle physics with momentum and gravity
- Scoring: Earn points by collecting coins and traveling distance
- High Scores: Persistent high score tracking
This project demonstrates:
- Object-oriented programming in C++
- Game development with SDL2
- Physics simulation
- Memory management
- Audio integration
- File I/O for high scores
The game includes custom graphics and sound effects located in the assets/ directory:
- Vehicle sprites and animations
- Background textures
- Sound effects (coins, fuel warnings, game over)
- Background music
This is a lab project for educational purposes. Feel free to fork and experiment with additional features.
Educational project for CSE-1211 course.
- SDL2 library for graphics and audio
- Course instructors and lab guidelines