top of page

05 Studio Project 3

-Run 'N' Gun-

Run 'N' Gun was my 3rd Studio Project. We tasked to create a shooting range game using OpenGL and c++. After 3 weeks of hard work, this is what we came up with. 

--------------------------------------

Screenshot (26).png
Options Screen

The list of things that I contributed to the project:

-Options Screen(Controls)

-Highscore

-Base features for engine

-WeaponEntity

-Customizable weapons.

-Ammo Crate

-Grenade

--------------------------------------

Screenshot (28).png

I was tasked to create the Options Screen where the player would be allowed to edit their controls. The keys would then be saved into a text file which would be read when the player loads the game scene so that the appropriate controls would be set up.

Highscore Screen

--------------------------------------

Screenshot (29).png

The Highscore screen is a really simple one where the game just reads from a text file and sorts it from highest to lowest score and when the player completes the round, the current score is compared to the list and if it is higher than any of them, it would be added into the list and then the top 10 score would be saved into the text file again.

Engine Features

--------------------------------------

Screenshot (30).png

I was the one who primarily worked on the base features for the game engine. I did :

-Collision system which is a simple AABB collision system. 

-Player controls:

WASD - movement

Space - jump

Shift - sprint

R - reload

-Stamina which would decrease when the player sprints and slowly regenerate over time.

-CWeaponInfo which is the parent class where all the other weapons are derived from.

-Minimap which is just a static image which moves

-based on the player's movement.

CWeaponInfo

--------------------------------------

Screenshot (63).png

CWeaponInfo is the parent class I created for all the other weapons to inherit from. It handles the firing method, recoil and the stats.

All weapons have the same stats:

-Max ammo

-Current ammo

-Fire rate

-Recoil amount

-Current Recoil

As the weapon gets fired, the weapon would increase its spread which would cause the bullet to fly out at a larger angle.

When the trigger is pulled, a bullet object is spawned moving towards a random direction, with the range depending on the amount of spread the weapon has.

Customizable Weapons

--------------------------------------

I decided to add the customize feature to make our project more unique. When the player holds down the 'E' button, the customization menu would pop up which would allow the player to choose to add a silencer or add a scope.

Ammo Crate

--------------------------------------

Screenshot (36).png

I created an ammo crate for the player to get back to max ammo. When the player is within range, the prompt would pop up and the player would need to hold down 'E' until the bar in the middle fills up.

Grenade

--------------------------------------

Screenshot (17).png

Other than the pistol and sniper, I also added in a throwable grenade. When the player holds down 'G', the grenade's targeting system would appear. This is done by using kinematics to calculate where the grenade would land and rendering a circle the size of the explosion's hitbox is on the ground. Since the grenade would move based on simple physics, the targeting system is accurate.

More Info

--------------------------------------

You can check out the game, source code and documentation here:

Password : references

--------------------------------------

bottom of page