Loading repository data…
Loading repository data…
bilalaniq / repository
A fast-paced, endless runner game built in C++ using SFML
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
A fast-paced, endless runner game built in C++ using SFML (Simple and Fast Multimedia Library). Navigate through subway tracks, collect coins, avoid obstacles, and climb the leaderboard!
Dynamic Gameplay: Experience progressively increasing difficulty with speed ramping
Power-ups: Collect special items to enhance gameplay:
Score System:
Player Profiles: Enter your name and compete against yourself and other players
Leaderboard: Track top scores with player names and high scores saved locally
Multiple Game States:
Lane-based Movement: Move left and right between tracks to avoid obstacles
Jump & Slide: Jump over obstacles or slide under them
Progressive Difficulty: Game speed increases over time, reaching up to 20x the base speed
# Install SFML
sudo apt install libsfml-dev
# Clone or download the project
cd SubwaySurfers
# Create build directory
mkdir build
cd build
# Build with CMake
cmake ..
make
# Run the game
./subwaysurfers
SFML_DIR path in CMakeLists.txt to match your SFML installationSubwaySurfers/
├── CMakeLists.txt # Build configuration
├── main.cpp # Entry point
├── GameEngine.h/cpp # Core game loop and state management
├── Player.h/cpp # Player character and controls
├── TrackManager.h/cpp # Track and obstacle management
├── Obstacle.h/cpp # Obstacle objects
├── Coin.h/cpp # Collectible coins
├── PowerUp.h/cpp # Power-up mechanics
├── ScoreManager.h/cpp # Score tracking and leaderboard
├── GameList.h # Game object lists
├── Fence.h/cpp # Fence/barrier objects
├── build/ # Compiled binaries and build files
└── README.md # This file
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
make
The game creates two data files:
highscore.dat: Stores your personal high scoreleaderboard.dat: Stores the top 3 player scores globallyMake sure the following asset files are in the game directory:
.png, .jpg).TTF).wav)These are automatically copied to the build directory during compilation.
This project is provided as-is for educational and personal use.
Feel free to fork this project, make improvements, and submit pull requests!
For issues or questions, please open an issue on GitHub.
Enjoy the game and good luck climbing the leaderboard! 🎮✨