A 3D flight combat simulator built with OpenGL, featuring realistic physics, dynamic lighting, and immersive aerial combat in a detailed city environment.
This project was developed as part of COMP-371 Computer Graphics course at Concordia University (Summer 2025). Experience thrilling aerial combat as you pilot a fully animated aircraft through a beautifully rendered 3D cityscape, complete with dynamic shadows and realistic lighting.
- Flight Simulation: Physics-based airplane controls with quaternion-based rotation system
- Combat System: Engage enemy aircraft with projectile-based weapons
- Interactive Environment: Explore a detailed 3D city with dynamic elements
- Dynamic Lighting: Real-time sun movement with realistic shadow casting and shadow mapping
- Hierarchical Animation: Multi-level aircraft animations (propeller, control surfaces, flaps)
- Advanced Rendering: Shadow mapping with depth buffer for realistic shadows
- Textured Models: High-quality textured 3D models throughout the environment
- Mouse: Camera orbit and zoom (third-person orbit camera)
- W/S: Pitch control with animated flap deployment
- A/D: Yaw control with animated rudder movement
- Mouse Left Click: Fire projectiles from wing-mounted positions
- Mouse Wheel: Camera zoom
- Shift/Ctrl: Speed control (accelerate/decelerate)
- OpenGL - Graphics rendering
- GLFW - Window management and input handling
- GLM - Mathematics library for 3D transformations and quaternions
- GLAD - OpenGL extension loading
- stb_image.h - Texture loading
- Assimp - 3D model loading (via Model class)
- OS: Windows 10/11, macOS, or Linux
- Compiler: C++17 compatible compiler
- Graphics: OpenGL 3.3+ compatible GPU
- Dependencies: CMake 3.10+
Ensure you have the following installed:
- CMake (3.10 or higher)
- C++ compiler (GCC, Clang, or MSVC)
- OpenGL development libraries
# Clone the repository
git clone https://github.com/codedsami/COMP-371-Computer-Graphics.git
cd COMP-371-Computer-Graphics
# Build the project
mkdir build && cd build
then run:
cmake ..
make
# Run the game
./ComputerGraphics
# Using Visual Studio
cmake .. -G "Visual Studio 16 2019"
cmake --build . --config Release
- โ Scene Setup: Large, multi-textured 3D city environment with GLB models
- โ Interactive Camera: Third-person orbit camera with full 360ยฐ mouse control
- โ Dynamic Lighting: Orbiting sun model with changing light positions for shadows
- โ Player Control: Physics-based airplane with quaternion rotation system
- โ
Hierarchical Animation: 3-level aircraft animation system:
- Level 1: Propeller rotation linked to velocity (spins faster with speed)
- Level 2: Rudder animation responding to yaw controls (A/D keys)
- Level 3: Wing flaps animation responding to pitch controls (W/S keys)
- โ Combat System: Dual projectile firing system with enemy spawning
- โ Shadow Mapping: Dynamic shadows with depth buffer rendering
- โ Collision Detection: AABB-based collision system for buildings and enemies
Requirement | Implementation Details |
---|---|
Core Libraries | OpenGL, GLFW, GLM, GLAD, stb_image.h, Assimp (via Model class) |
Interactive Camera | Third-person orbit camera with 360ยฐ mouse look and scroll zoom |
Camera Movement | Relative movement system - camera moves relative to viewing direction |
Multiple Textures | Distinct textures for city, aircraft, sun, and projectiles |
Hierarchical Animation | 3-level deep animation system (propeller โ rudder โ flaps) |
Dynamic Lighting | Moving sun light source that orbits the scene continuously |
Visual Differentiation | All models and textures are unique (not from tutorials) |
- Rotation System: Uses GLM quaternions for smooth, gimbal-lock-free rotation
- Physics Model: Velocity-based movement with realistic flight dynamics
- Control Surfaces: Animated control surfaces respond to player input
- Collision Detection: AABB-based collision system for buildings and terrain
- Depth Buffer: 2048x2048 shadow map with depth texture
- Light Space Matrix: Orthographic projection for directional sunlight
- Dynamic Updates: Shadows update as sun orbits the scene
- Realistic Rendering: Proper shadow casting for all objects
Animation hierarchy structure:
Plane (root)
โโโ Propeller (rotates based on velocity)
โโโ Rudder (yaws based on A/D input)
โโโ Flaps (pitch based on W/S input)
Name | GitHub | Student ID | Role |
---|---|---|---|
Miskat Mahmud | @codedsami | 40250110 | SuperVisor, CodeReviewer, Critical Tester |
Sadee Shadman | @sadeeshadman | 40236919 | Graphics & Animation |
Maharaj Teertha Deb | @TeerthaDeb | 40227747 | Physics & Controls |
- City Environment: Casa City Logo by Digital Urban
- Aircraft: Colombian EMB-314 Tucano by 42manako
- Missile: AIM-120C AMRAAM by Planetrix23
- Sun Model: Sphere from MIT WebLogo
- Exploision : Explosion by andersdt
- Frustum Culling: Optimized rendering for large scenes
- Level of Detail: Dynamic model complexity based on distance
- Efficient Shaders: Optimized GLSL shaders for performance
- Collision Optimization: AABB-based collision detection for efficiency
- OpenGL Version Error: Ensure your GPU supports OpenGL 3.3+
- Missing Textures: Verify all model files are in the correct directory
- Build Errors: Check CMake and compiler compatibility
- GLM Include Errors: Ensure GLM library is properly installed
cmake .. -DCMAKE_BUILD_TYPE=Debug
make
./ComputerGraphics
This project is developed for educational purposes as part of COMP-371 Computer Graphics course at Concordia University (Summer 2025 - Assignment 1).
- Sound effects and background music
- Additional aircraft types with different flight characteristics
- Weather system with dynamic clouds and lighting
- Particle effects for explosions and contrails
- Enhanced AI for enemy aircraft behavior
Built with โค๏ธ for COMP-371 Computer Graphics - Concordia University