top of page

FPS Target Range - Unity C#

I started this project because I wanted to try something new. After thinking about it, I came up with the idea of making a first-person shooter game where you shoot simple targets to improve your score. I wanted to challenge myself to create a game that could be easily expanded upon, specifically the gun system, so creating new guns would be quick and easy. My other focus was making the game feel good and fun to play.

 

To create the game, I used assets I found online or had in my assets. While I aimed to make the graphics look decent, it wasn't my primary focus for this game.

The movement is fully physics-based and controllable through the inspector. Additionally, the game features sliding and crouching mechanics. Sliding occurs when you are in motion and then crouch, resulting in a significantly reduced deceleration speed that causes you to slide. Crouching, on the other hand, not only reduces the height of the player collider but also decreases the gun spread, resulting in improved accuracy.

The guns are scriptable objects that store all the data of the weapon, allowing for easy integration into the game. The player possesses a 'Gun Handler' responsible for managing all the shooting functions, as well as an inventory called 'all guns' where you can assign a model and scriptable object to obtain a usable gun.

​

The 'all guns' object also includes information about the amount of ammo in each gun's clip. The management of ammunition is handled by the 'Ammo Handler' script, which maintains data on various ammo types and tracks the remaining quantity for each type. The ammo data includes details such as the damage caused by a particular caliber and the recoil power multiplier. For instance, a larger and more powerful bullet would result in greater recoil when fired from the same gun.

The game is straightforward: shoot the targets and get points within a limited time. Each target holds its own point value, which you receive upon hitting them. The dummy serves as an example of an enemy, with the text above its head indicating the damage you are inflicting on the dummy. The points you receive are determined by your damage, multiplied by a factor in the dummy script.

​

Overall, I am really happy with the project, and it was a fun challenge.

​

Click here to see the GitHub repository & code.

​

© 2023 by Yerio Janssen.

    bottom of page