Prime Future (Prototype)
Unity 3D — PC
November 2020 - December 2020
September 2021 - October 2021
Solo Project
November 2020 - December 2020
September 2021 - October 2021
Solo Project
A Sandbox For a Curious Nerd
Prime Future is a project that started as a school assignment and blossomed into a toy box for me to test, implement, and refine FPS mechanics and game feel. Over the years, I've clocked more hours in FPS games than any other genre and my love and experience in the space has given me many ideas of the years for how I might tackle common mechanics and issues. In September 2021, I drudged up an old first-person project and overhauled it to serve as my new FPS sandbox. While most of the things I have been testing revolve around multiplayer, competitive shooters, many of these lessons can be translated into singleplayer and cooperative shooters.
Allow me to share with you some of the (many) things I've learned and concluded from the experience.
Allow me to share with you some of the (many) things I've learned and concluded from the experience.
Movement
As is often the case, the specific movement mechanics of a game drastically affect both the feel and flow of that game. It is the main way that a player will interface with your game. If a game's movement isn't purpose built to complement the main mechanics of that game, the experience will suffer. One of the most important aspects of a game's movement mechanics—and the one I based my combat style around—is acceleration.
Acceleration
The speed and manner in which characters accelerate in competitive shooters has a large impact in how engagements between players play out. Since the dawn of the FPS genre, the act of strafing back and forth has been the go-to way to avoid enemy fire and the rate at which your character accelerates (and decelerates) in and out of those strafes plays a large role in how difficult it will be to hit a squirrely target.
A slower, more gradual acceleration makes targets easier to hit but makes moving around the map sluggish and unresponsive.
An instantly accelerating target is extremely difficult to hit, but it can also make movement feel artificial and less controllable. Somewhere in the middle ground lies a balance of responsive yet reactable, fluid yet controllable. To accomplish this, I have made use of Unity's soon-to-be outdated legacy input system to create an easily tweakable player acceleration curve. Using the Input.GetAxis() method, I can turn binary button inputs into gradual speed values that mimic desireable, physically based acceleration on the cheap. As a bonus, the input system also handles conflicting directional inputs for me (more on this later) and provides parameters to control the rate at which the return value interpolates to and from its neutral position. |
In some games, moving incurs an accuracy penalty to your weapon while in others it does not. As I talk about later, I chose to include an accuracy penalty to moving. For games where this is the case, it is preferable to shoot while stationary or as close to it as possible. In games like Counter Strike where movement inaccuracy is severe, engagement ranges can be long, and damage is high, moving while shooting is a death sentence. To avoid this, players usually employ a movement technique that works around their weapon inaccuracy while exposing themselves to as little danger as possible: peek shooting.
Peek shooting (and its cousin, jiggle peeking) is a technique that makes use of movement systems where momentum can be canceled quickly and acceleration is snappy. Peek shooting is the act of strafing around a corner and reversing your walking direction just as you peek around the corner. The goal is to time your shot at the precise moment when your momentum drags to a halt and your speed is zero. In this split second, your weapon is at its most accurate and you can usually get off a shot or two before your character strafes back behind cover, away from danger. Combined with good map knowledge and crosshair placement, peek shooting can be an invaluable tool.
As mentioned earlier, my rapid prototype solution allows me to control how player input is interpreted and fed to the movement controller. I set Unity's input system to snap an axis' output to 0 before interpolating to its new value if an opposite input to the current movement direction is pressed. In other words, players come to a dead stop nearly instantly when changing direction, but gradually accelerate from a standstill. This kind of movement maximizes the effectiveness of techniques like peek shooting and rewards precise timing and map knowledge.
Peek shooting (and its cousin, jiggle peeking) is a technique that makes use of movement systems where momentum can be canceled quickly and acceleration is snappy. Peek shooting is the act of strafing around a corner and reversing your walking direction just as you peek around the corner. The goal is to time your shot at the precise moment when your momentum drags to a halt and your speed is zero. In this split second, your weapon is at its most accurate and you can usually get off a shot or two before your character strafes back behind cover, away from danger. Combined with good map knowledge and crosshair placement, peek shooting can be an invaluable tool.
As mentioned earlier, my rapid prototype solution allows me to control how player input is interpreted and fed to the movement controller. I set Unity's input system to snap an axis' output to 0 before interpolating to its new value if an opposite input to the current movement direction is pressed. In other words, players come to a dead stop nearly instantly when changing direction, but gradually accelerate from a standstill. This kind of movement maximizes the effectiveness of techniques like peek shooting and rewards precise timing and map knowledge.
Weapons
No matter how good it feels to move around a map, if your FPS game lacks satisfying gun play, you have failed before you have started.
My main focus when making this prototype was on iteration time and flexibility; I absolutely could have spent more time polishing the feedback of firing weapons, but the basics are there. I borrowed a method for creating weapon 'cards' using the Scriptable Object class in Unity from a previous project to make creating and modifying weapon statistics quick and simple. I built upon this system to include Borderlands-esque weapon inspection panels alongside a Halo inspired, tried-and-true health and shields system. When it came to weapons, I was most interested in creating an interesting balance of weaponry whose strengths and weaknesses meshed well with the game's movement mechanics and created an interesting experience across a host of engagement ranges. Before I could do any of this, though, I needed to devise a solution for ranged damage fall off. |
Damage Fall Off
Damage fall off is a common mechanic wherein a weapon's range stat influences its damage output. In its simplest form, the further away the target, the less damage the weapon deals. More sophisticated solutions may include a minimum range inside of which a weapon deals maximum damage, a damage floor that prevents damage fall off from reducing a weapon's damage to zero, different fall off curves that determine how damage fall off applies to a weapon, and more.
For this prototype, I chose to design my damage fall off mechanic as such:
For this prototype, I chose to design my damage fall off mechanic as such:
- Minimum effective range (in meters) given by weapon's range stat.
- Damage fall off resistance (hidden stat) on a per-gun basis
- This parameter affects how gradually damage fall off affects weapon damage beyond its minimum range
- Damage fall off steepness (hidden stat) on a per-gun basis
- This parameter affects how quickly a weapon's damage trends down once it is no longer resisting damage fall off
Weapon Feel
When designing weapons, I prefer to think about their feel in terms of video game analogs rather than the real thing. Many other developers have made the effort to translate the experience of a shotgun into video game form, and this collective effort provides me a range of techniques and results to play with when creating a weapon for my own game. It is still important to understand the real life weapon you are trying to emulate, but piggy-backing on existing gaming conventions gets me a lot of the way there with relatively little effort. Given my goal of creating a quick prototyping FPS sandbox, this is my preferred method.
Below is my process for designing a shotgun using the method described above. I did this for all of the weapons in this prototype, but for the sake of brevity I'm only walking through my steps for one. I have included a stats summary of all the weapons and a discussion on weapon balance further below.
Below is my process for designing a shotgun using the method described above. I did this for all of the weapons in this prototype, but for the sake of brevity I'm only walking through my steps for one. I have included a stats summary of all the weapons and a discussion on weapon balance further below.
Shotguns
Shotguns are one of the weapon archetypes that video games have experimented the most with. We have seen lots of wacky takes on spread-shot weapons, and they've become many players' comfort weapon. Their powerful close range damage and relative ease of use usually mean they become anchor points around which a weapon ecosystem is balanced.
Below is a table comparing shotguns across different games and how their standout properties affect gameplay. This is by no means an exhaustive list but is something I often do when designing weapons that I want to serve a certain purpose or fit a certain role within a game.
Shotguns are one of the weapon archetypes that video games have experimented the most with. We have seen lots of wacky takes on spread-shot weapons, and they've become many players' comfort weapon. Their powerful close range damage and relative ease of use usually mean they become anchor points around which a weapon ecosystem is balanced.
Below is a table comparing shotguns across different games and how their standout properties affect gameplay. This is by no means an exhaustive list but is something I often do when designing weapons that I want to serve a certain purpose or fit a certain role within a game.
Game / Weapon Analog |
Standout Attributes |
Observations |
Reaper's Hellfire Shotguns (Overwatch) CQS48 Bulldog (Halo Infinite) Type-52 Pistol (Halo 3) |
High 'magazine' count Short effective range, wide spread Higher fire rate Rarely a one-shot kill |
Forgiving but niche weapon. Emphasizes the 'closer the better' feel of video game shotguns. Fire rate gives a more rhythmic feel. Tracking targets is as viable as flicking to them. Consistent, high average DPS rather than burst damage. Great cleanup weapon with quick (but rarely fastest), 2-3 shot TTK. |
Pump Shotgun (Doom) 'Realistic' video game shotgun EG: Back 4 Blood |
High stopping power (aim punch / stagger) Significant damage falloff resistance Low pellet count, high per-pellet damage Low 'magazine' capacity |
Burst damage weapon that rewards center mass accuracy. Reload speed becomes critical as magazine size can be very low. The generic shotgun option. High skill floor, low ceiling. |
Super Shotgun (Doom) High-Impact frame Shotguns (Destiny) Mag-7 (CSGO) Jakobs Shotguns (Borderlands) |
Devastatingly high damage and recoil Short effective range, wide spread High pellet count Very limited 'magazine' capacity (typically ≤5) Limited by reload speed |
The archetypal one-shot shotgun. Usually a break-action or sawed-off, compact frame. You're either within range or not; very strict. The 'close range' gatekeeper: this defines close range in its ecosystem. You better be faster or more lethal within its range or else. |
Spread Gun (Contra) Shotgun (Metal Slug) Big Shotgun (Enter the Gungeon) Arcade / SHMUP Shotgun |
Bullets. Many, large, slow-moving bullets. Large projectile size Quite large spread Just fill the screen with bullets |
These are typically not FPS games, but that doesn't mean they're not worth researching! Bullet size and speed make for more positional play. Projectile readability is incredibly important. Very fun. Very satisfying. |
Real, non-specialized spread shotguns |
WAY less spread than video games Great at medium ranges (10+ meters) Versatile ammo selection for different situations Limited 'magazine' capacity Barrel length and weight make for a poor extreme close range experience High stopping power but low penetration |
Be safe. Shoot responsibly. |
Shotgun Design Breakdown
Since this sandbox has a limited selection of weapons, I wanted to experiment with the above archetypes and try something different. The Piety and Devotion lands somewhere between your basic shotgun (row 2) and the more forgiving cleanup shotguns (row 1). Given the combined strength of fast, controllable aerial mobility and in-air accuracy, I shied away from allowing this shotgun to one-shot from any distance. It features a medium pellet count but a tight spread making it formidable even at a distance of 10 meters. At its optimal range below 10 meters, two shots with minimal missed pellets will lock up a kill. This makes the Piety and Devotion the highest TTK weapon in the sandbox which is typical for most shotguns. What is atypical, however, is the absence of that one-shot kill. At ranges beyond 9 meters, Piety and Devotion is not guaranteed a two-shot kill. It still gets them most of the time with perfect aim, but not always. |
Beyond 12.5 meters, you enter three-shot territory putting the gun's TTK behind both Due Process and Tolling Bell assuming you hit maximum pellets. While no longer the TTK king (TTKK to those who appreciate symmetry), Piety and Devotion's kill time is still within .15 seconds of both other weapons at these maximum ranges and commands respect from all but those with perfect aim. The final chain of restraint keeping it back, however, is its very shallow four-round capacity. While more forgiving than a non-spread weapon its tight spread, conservative pellet count, and strict range requirements mean Piety and Devotion offers a powerful package with a narrow margin of error; a healthy place for a shotgun to be.
Weapon Balance
Time for the Internet's favorite forum topic: weapon balance. The weapon ecosystem I'm working in is deliberately simplified so as to make mechanics testing and this discussion easier. While I would love to sit and write about how critical hits and snipers change the landscape of a game, my objective in creating this project is to test mechanics implementation (haven't gotten to crits yet) and the illustration of the affects those mechanics have on gun play.
Weapon |
Damage per Shot |
Rate of Fire |
Optimal Time to Kill |
Effective Range |
Due Process (Revolver) |
40 |
140 RPM |
1.7143 seconds |
15 meters |
Tolling Bell (Rifle) |
11 |
600 RPM |
1.8 seconds |
20 meters (30 meter falloff) |
Piety and Devotion (Shotgun) |
120 (15 x 8 pellets) |
65 RPM |
0.9231 seconds |
9 meters |
My original design constraints for this system were the following:
The first of these constraints is simple enough, but managing a healthy balance when accounting for a missed shot or two was sometimes tricky. My intention in keeping keeping weapon TTK similar as they scale with mistakes was to ensure that similarly skilled players would still have close fights even if they're not being optimal. It is easy to get caught up at the upper bounds of weapon performance and forget that humans are not aim bots. The experience of less-than-perfect play is incredibly important for a healthy ecosystem. The last two constraints I imposed on myself describe the relationship between weapons more than it does numeric properties of the system. They describe how I want weapon combat to feel during gameplay which I think is an important and overlooked consideration in systems design.
- Time to kill of non-close quarters weapons must be > 1.5 seconds.
- When weapons miss their TTK window, their new optimal TTK scales closely with other weapons as they make similar mistakes.
- The longest range weapon must suffer a loss of consistency before its damage falloff begins.
- The medium range option must not be so forgiving that it dominates outside of shotgun range while within its damage falloff range.
The first of these constraints is simple enough, but managing a healthy balance when accounting for a missed shot or two was sometimes tricky. My intention in keeping keeping weapon TTK similar as they scale with mistakes was to ensure that similarly skilled players would still have close fights even if they're not being optimal. It is easy to get caught up at the upper bounds of weapon performance and forget that humans are not aim bots. The experience of less-than-perfect play is incredibly important for a healthy ecosystem. The last two constraints I imposed on myself describe the relationship between weapons more than it does numeric properties of the system. They describe how I want weapon combat to feel during gameplay which I think is an important and overlooked consideration in systems design.
Critical Ranges
At these values, there are a handful of ranges where weapons are just within or at the edge of their effective range where positioning and movement become important. It is with these incremental ranges in mind that level designers design spaces that not only look good but fit the ecosystem of weapons being used within them. These ranges work out to be 10 and 5 meters. Let's look at why that is.
Piety and Devotion
Within 10 meters, Piety and Devotion is capable of killing within its optimal TTK. It isn't guaranteed—remember, anything above 9 meters is at the mercy of pellet spread—but it is close enough to be a real threat. Just outside of that range, Piety and Devotion is within three-shot range and has a comparable TTK to both other weapons making it effective even as players move and jump and pellets miss their mark. It is strongly encouraged, but not exclusively limited, to staying within this larger range increment of 10 meters.
Due Process
At 15 meters, we hit the effective range of Due Process. At 1.5 critical range increments—or one large and one small range increment—we are in revolver territory. Thanks to the sharp, agile movement in this prototype, this gun is well suited for peek shooting at opponents who rely on sustained automatic fire to do lethal damage and back peddling against shotgunners who are closing in from just outside their desired range. Due Process was designed to be a great option for players who enjoy moving fast, flicking to targets. In return, it demands that you maneuver within a tight 5 meter margin between your opponents' optimal ranges or risk falling into a losing engagement. To keep true to my design restrictions, I decided to make Due Process a semi-automatic weapon that does damage in chunks. This makes the weapon much less forgiving than its counterparts if you don't hit your shots. While the weapon does have a goldilocks zone where it thrives, within 15 meters Tolling Bell's accuracy cone with maximum bloom can still fit completely inside a player's model and Piety and Devotion is teetering at the edge of three shot territory. This weapon is a glass cannon best suited to the daring and the accurate.
Tolling Bell
Lastly, we get to the 20 meter range; two large critical range increments. Unlike Due Process and Piety and Devotion's effective ranges, Tolling Bell's damage falloff doesn't begin for another 10 meters. What gives? Well, it is at this distance that Tolling Bell's full-auto inaccuracy causes its spread to exceed the bounds of a player model with perfect aim. Typically, Tolling Bell enthusiasts would be best suited tracking their targets while holding down the trigger. Beyond 20 meters, this changes. Suddenly, burst and tap shooting become a necessary skill to eek out the weapon's maximum potential. At these distances, Due Process is still kicking at 38-35 damage per shot, but the damage falloff is enough to buy you an extra shot by the revolver. Unlike Due Process, however, if caught out of position, Tolling Bell's higher optimal TTK means it is less suited to dealing with shotguns as tracking becomes more difficult. Overall, Tolling Bell is positioned as your less efficient but more forgiving option. Shot timing is non-existent and the sheer volume of bullets it fires means missing a handful of shots barely impacts your lethality.
At these values, there are a handful of ranges where weapons are just within or at the edge of their effective range where positioning and movement become important. It is with these incremental ranges in mind that level designers design spaces that not only look good but fit the ecosystem of weapons being used within them. These ranges work out to be 10 and 5 meters. Let's look at why that is.
Piety and Devotion
Within 10 meters, Piety and Devotion is capable of killing within its optimal TTK. It isn't guaranteed—remember, anything above 9 meters is at the mercy of pellet spread—but it is close enough to be a real threat. Just outside of that range, Piety and Devotion is within three-shot range and has a comparable TTK to both other weapons making it effective even as players move and jump and pellets miss their mark. It is strongly encouraged, but not exclusively limited, to staying within this larger range increment of 10 meters.
Due Process
At 15 meters, we hit the effective range of Due Process. At 1.5 critical range increments—or one large and one small range increment—we are in revolver territory. Thanks to the sharp, agile movement in this prototype, this gun is well suited for peek shooting at opponents who rely on sustained automatic fire to do lethal damage and back peddling against shotgunners who are closing in from just outside their desired range. Due Process was designed to be a great option for players who enjoy moving fast, flicking to targets. In return, it demands that you maneuver within a tight 5 meter margin between your opponents' optimal ranges or risk falling into a losing engagement. To keep true to my design restrictions, I decided to make Due Process a semi-automatic weapon that does damage in chunks. This makes the weapon much less forgiving than its counterparts if you don't hit your shots. While the weapon does have a goldilocks zone where it thrives, within 15 meters Tolling Bell's accuracy cone with maximum bloom can still fit completely inside a player's model and Piety and Devotion is teetering at the edge of three shot territory. This weapon is a glass cannon best suited to the daring and the accurate.
Tolling Bell
Lastly, we get to the 20 meter range; two large critical range increments. Unlike Due Process and Piety and Devotion's effective ranges, Tolling Bell's damage falloff doesn't begin for another 10 meters. What gives? Well, it is at this distance that Tolling Bell's full-auto inaccuracy causes its spread to exceed the bounds of a player model with perfect aim. Typically, Tolling Bell enthusiasts would be best suited tracking their targets while holding down the trigger. Beyond 20 meters, this changes. Suddenly, burst and tap shooting become a necessary skill to eek out the weapon's maximum potential. At these distances, Due Process is still kicking at 38-35 damage per shot, but the damage falloff is enough to buy you an extra shot by the revolver. Unlike Due Process, however, if caught out of position, Tolling Bell's higher optimal TTK means it is less suited to dealing with shotguns as tracking becomes more difficult. Overall, Tolling Bell is positioned as your less efficient but more forgiving option. Shot timing is non-existent and the sheer volume of bullets it fires means missing a handful of shots barely impacts your lethality.