Skip to content

GeetanshMohindru/Galaxy-Wars-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ Galaxy Wars - A Computer Graphics Project

Galaxy Wars is an arcade-style shooting game developed using C++ with OpenGL and GLUT. Players control a futuristic ship, shoot bullets, and destroy incoming enemies โ€” including special Trojan enemies that require multiple hits and offer bonus points.

๐Ÿ“ธ Gameplay Screenshot

Screenshot 2025-05-06 152006


๐Ÿš€ Game Features

  • Player Control: Move left and right, shoot upward bullets.
  • Enemy Types:
    • ๐Ÿ”ด Normal Enemies: Red, die in one hit, +1 point.
    • ๐ŸŸฃ Trojan Enemies: Purple, need 2 hits, blink on damage, +3 points.
  • ๐Ÿ’ฅ Explosions: Colorful visual effects on enemy destruction.
  • ๐Ÿ“Š Score Tracking: Real-time kill count display.
  • ๐Ÿ—‚๏ธ In-game Legend: Shows controls and contributors.

๐ŸŽฎ Controls

Key Action
โฌ…๏ธ / โžก๏ธ Move Ship Left/Right
SPACE Shoot Bullet
ESC Exit Game

๐Ÿ‘จโ€๐Ÿ’ป Contributors

  • Geetansh Mohindru (102203718)
  • Shrey Dhar Dubey (102383011)

๐Ÿง  Technical Highlights

  • OpenGL (GLUT) based rendering
  • Modular code structure with structs for Bullet, Enemy, and Explosion
  • Real-time animation using glutTimerFunc()
  • Collision detection between bullets and enemies
  • Random enemy generation
  • Trojan enemy logic: blinking and split-hit mechanism

๐Ÿ”ง Compilation & Execution (Visual Studio)

To run this project using Visual Studio on Windows:

โœ… Setup Instructions:

  • Ensure your Visual Studio project is set to x86 (32-bit) configuration.
  • Make sure OpenGL and GLUT (FreeGLUT) libraries are properly linked in:
    • Project > Properties > Linker > Input > Additional Dependencies
    • Include: opengl32.lib, glu32.lib, freeglut.lib
    • Also, include the proper header/lib/dll paths in VC++ Directories.

โš ๏ธ Build Errors?

  • Try going to Build > Rebuild Solution to fix dependency issues.
  • If you get errors related to the #include <glut.h> line:
    • Replace it with:
      #include <GL/glut.h>
    • This depends on how GLUT/OpenGL is installed and set up on your system.

๐Ÿ’ก This code assumes you are using the exact .cpp file provided above (e.g., finalCode.cpp).

About

Computer Graphics Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages