Scalable Weapons System
Project Duration: 2 Months
Introduction:
The goal of this project was to make a Scalable Weapons System that could be deployed into any number of projects and easily built upon.
Every part of this project was specifically built to act as a tool that other designers could pull from to use in their own projects.
My Role:
Gameplay Systems Designer
Key Contributions:
Weapon Inventory System: Following major FPS standards I developed a weapon inventory system that could be utilized by players or ai characters.
Weapon Design Tools: I designed a framework for designers to easily and quickly create new weapons based on existing FPS weapon archetypes.
User Interface: I created a UI that quickly provides players with information regarding recoil spread, inventory, and ammunition for their weapons.
Thorough System Documentation: Through thoroughly documenting this system I have made possible for any team to integrate it into their own project.
Tools Used:
Unreal Engine 5
Unreal Engine Blueprints
GitHub
Notion (Documentation)
In Further Detail
Weapon Inventory System:
In designing the Weapon Inventory I took heavy inspiration from the big names in the FPS genre. Two guns, one melee, and two types of throwable. Building towards this industry standard greatly assisted in guiding my decisions when building the inventory.
The Weapon Inventory was also built as a Blueprint Component. This made it easy to use as it could be added to any Player or AI actor and they would be able to begin storing a collection of weapons and calling actions on any weapon they had equipped. That simple, add the Weapon Inventory BPC to an actor, grant the Weapon Inventory BPC a weapon, and their ready to start shooting… or stabbing, or maybe they do nice things like heal… but probably not.
A final key point to the versatility of the Weapon Inventory’s design is that at no point does the inventory owner need to reference the Inventory, and at no point does the Weapon need to reference the Inventory it is inside of. This level of de-coupling allows for implementation as the inventory could be implemented with completely unique characters and weapons in each project and have no issues.
Weapon Design Tools:
Building design tools for the weapons was tricky. Things needed to be built so that a new weapon could be implemented in as easy as 20 minutes, but things could not be so specific that the whole system becomes unusable for creating weapon variety.
I was able to achieve both these goals and enable future designers through the use of a two step approach.
Weapon Data Assets:
Data Assets allowed me to build a way for to store all of the important variables that designers will want to touch when creating a new weapon. Rather than having to go into the blueprint and move past the code or other unimportant variables, designers are able to see everything in one place and create new weapons by simple filling in the values and attaching the new Data Asset to a child of one of the Base Weapon Blueprints.
Base Weapon Blueprints enabled me to create all the in depth functionality of each weapon type (melee, ranged, and throwable) and save designers dozens of hours of set up. I tactically built many of the systems to use easy to override functions and events allowing designers to implement their own logic onto children of these weapon types.
An example would be shotguns overriding shoot function on their parent class to make multiple pellets fire at once.
My Biggest Challenge:
Keeping things abstract
A big issue I ran into was thinking through how to handle these systems like the Interact BPC or the Weapon Blueprints where they would need to get effect things like the players camera or fire line traces from the cameras position, but yet have no reference to that player and thus no reference to the camera.
I eventually settled on the solution of using sockets that could be implemented on to character meshes in order to provide reference points to the weapon about the default camera position.
Finally for when I did need to actually adjust the camera I would have the Weapon on Equip find if its owner had a camera component. If it did it would upgrade that component to a variable and be able to manipulate it from there.