A fun platform jumping game built with C++ and Raylib. Jump your way up through randomly generated platforms, avoid falling, and reach the top!
Jumping Ball is a side-scrolling platformer game where you control a ball that jumps from platform to platform. The goal is to climb as high as possible without falling off the bottom of the screen. The game features:
- Dynamic Platform Generation: Randomly generated platforms for endless gameplay
- Smooth Physics: Realistic gravity and collision detection
- Score Tracking: Your score increases as you climb higher
- Vertical Scrolling Camera: The camera follows your player as you ascend
Before you can compile and play, you'll need:
- C++ Compiler: MinGW with g++ (recommended: MSYS2 with ucrt64)
- Raylib Library: The graphics library used for rendering
- Make Tool: MinGW32-make (comes with MSYS2)
If you don't have MSYS2 and Raylib installed:
- Download MSYS2 from https://www.msys2.org/
- Install and update packages
- Download and set up Raylib in a known location (default:
C:/raylib/raylib)
If you have Raylib installed at C:/raylib/raylib, simply run:
mingw32-make -f Makefile.simpleThis creates a game.exe executable in the project root.
If your Raylib installation is in a different location, specify the path:
mingw32-make -f Makefile.simple RAYLIB_PATH=C:/path/to/raylib-
Debug Build (default, includes debug symbols):
mingw32-make -f Makefile.simple BUILD=debug
-
Release Build (optimized, smaller executable):
mingw32-make -f Makefile.simple BUILD=release
To remove compiled object files and the executable:
mingw32-make -f Makefile.simple cleanThen compile again with mingw32-make -f Makefile.simple
After compilation, run the executable:
.\game.exeThe game will launch in fullscreen mode.
- Space or Up Arrow: Jump (press to jump, hold for higher jumps)
- Left Arrow or A: Move left
- Right Arrow or D: Move right
- ESC: Exit the game
- Time your jumps: Land in the center of platforms for stability
- Build momentum: Chain jumps together to climb faster
- Watch the camera: The screen scrolls up as you climb—don't let it catch you!
- Avoid falling: Fall off the bottom of the screen and it's game over
- Restart easily: When the game ends, press a key to restart
src/
├── main.cpp # Entry point
├── config/
│ └── Config.h # Game configuration constants
├── game/
│ ├── Game.h # Main game controller
│ └── Game.cpp
├── player/
│ ├── Player.h # Player/ball logic
│ └── Player.cpp
└── level/
├── Level.h # Platform and level generation
└── Level.cpp
Game settings can be modified in src/config/Config.h. You can adjust:
- Number of platforms
- Window dimensions
- Game physics (gravity, jump force)
- And more!
After changing configuration, recompile with mingw32-make -f Makefile.simple.
"mingw32-make: command not found"
- Ensure MSYS2 is installed and added to your system PATH
"Cannot find raylib"
- Verify your Raylib installation path and pass it with
RAYLIB_PATH=...
Game runs but graphics look wrong
- Try updating your graphics drivers
- Ensure you're using the correct Raylib version
This project uses:
- Raylib: Cross-platform graphics library (https://www.raylib.com/)
- C++14: For modern C++ features
- MinGW: GNU Compiler Collection for Windows
Enjoy the game! 🎮
