Skip to content

EtoileScintillante/opengl-drone-shooter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drone Shooter

macOS Build Status
Drone Shooter is a simple FPS game created with OpenGL.
The goal is to shoot as many drones as you can before they kill you. There are four maps to choose from: forest, desert, snow and night.

gif of game play

About

Drone Shooter was created using just OpenGL, no game engine. It's purely done for fun and learning purposes.
The inspiration for this project was this OpenGL FPS game.

Some of the code is based on code from the learnopengl tutorial by Joey de Vries, such as shader.h, mesh.h and model.h.

The game objects (models, sounds, font and textures) were all downloaded for free from the internet.
I used sites like free3d, soundjay and freebpr. Unfortunately I did not save the exact links to the used objects.

To implement collision detection between the player’s bullet and enemy and between the enemy’s laser beam and player this site was a great resource. Box.h and ray.h are based on code from that site.

For adding soundeffects, rendering text and loading 3D models the libraries miniaudio, freetype and assimp were used.

Maps

Forest

screenshot of forest map

Desert

screenshot of desert map

Snow

screenshot of snow map

Night

screenshot of night map

Player

There is no actual player character, it’s just a gun. The direction of the bullet is the same as the front vector of the player, which makes aiming easy. The player’s bounding box looks as follows:

bounding box player

Enemy

The enemy is a drone that can shoot laser beams. Its aim is not perfect; some randomness is added when calculating the direction of the laser beam, otherwise every shot would lead to a decrease in the player’s health.
The bounding box of the enemy does not cover the whole drone, as can be seen in the image below. It may look weird but it’s not a problem at all. The bounding box is still big enough so that hitting the drone is quite easy, even when standing far away.

bounding box enemy

Building and Running the Game (macOS - arm64)

Prerequisites

  • CMake (version 3.5 or higher)
  • C++ Compiler with C++17 support
  • Git

Instructions

  1. Clone this Repository

    git clone https://github.com/EtoileScintillante/opengl-drone-shooter.git
    cd opengl-drone-shooter
  2. Build the Game

    mkdir build
    cd build
    cmake ..
    cmake --build .
  3. Run the Game (executable not in build dir)

    ./Drone-Shooter

Evolution of the game

During the development I regularly uploaded videos to YouTube to keep track of the progress I made.

About

Drone Shooter: simple FPS game created with OpenGL

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages