A 3D OpenGL game featuring a football player running through obstacles, collecting coins, and scoring goals. Built for Mac and Windows platforms.
./build_mac.sh
./football_gamebuild_windows.bat
football_game.exe- 🎮 Two Levels: Complete Level 1 to automatically advance to Level 2
- 📹 Dual Camera Views: Switch between first-person and third-person perspectives
- 🎯 Scoring System: Collect coins (+10/+20/+30) and score goals (+100)
- 🚧 Obstacles: Avoid traffic cones with collision detection
- ⚽ Ball Physics: Shoot the ball with realistic physics
- ✨ Animations: Player running, jumping, sliding; coin rotation; net shake on goal
- 💡 Dynamic Lighting: Animated stadium lights with color and intensity changes
| Action | Keyboard | Mouse |
|---|---|---|
| Move Left | A / Left Arrow | - |
| Move Right | D / Right Arrow | - |
| Jump | Space / Up Arrow | Left Click |
| Slide | S / Down Arrow | - |
| Shoot Ball | F | Middle Click |
| Switch Camera | C | Right Click |
| Exit | ESC | - |
See BUILD_INSTRUCTIONS.md for detailed build instructions.
Mac (using Makefile):
make
make runWindows (MinGW):
g++ -std=c++11 project/*.cpp -o football_game.exe -lopengl32 -lglu32 -lfreeglutUsing CMake (All Platforms):
mkdir build && cd build
cmake ..
cmake --build .project/
├── main.cpp # Main game loop
├── Player.cpp/h # Player character
├── Cone.cpp/h # Obstacles
├── Net.cpp/h # Goal net
├── Ball.cpp/h # Football
├── Coin.cpp/h # Collectibles
├── GameManager.cpp/h # Game state & levels
├── Vector3f.h # Math utilities
└── Platform.h # Cross-platform support
- Mac: Xcode Command Line Tools (OpenGL/GLUT included)
- Windows: MinGW or Visual Studio + FreeGLUT
- OpenGL 2.0 or higher
Educational project for DMET 502 Computer Graphics course.