Super Shotgun Man's Movement


The Overall Design

Super Shotgun Man was originally a short 2D side-scrolling platformer made for a college course by our artist, Michael Willner. It involved walking from side to side, jumping over gaps with the kickback of a pump action shotgun, and blasting mafiosos. We wanted to adapt this for the 7DFPS Game Jam, so the question became, “How could we expand and adapt these mechanics into 3D that would be both fun and fluid.” After a lot of deliberation, we decided on a list of mechanics; which included both new additions and new adaptations on existing mechanics. We looked for inspiration from a number of our favorite games that do similar things. We looked to Quake for air mobility, we looked to Team Fortress 2 and Deep Rock Galactic for shotgun kickback, we looked to DOOM and Half Life for ground mobility, and we looked to Sonic and Ultrakill for slope mobility. We then spent a lot of time tuning the player until it “felt right.”

Air and Ground Mobility

  My first concern was with air control. While we had decided that we wanted air strafing and b-hopping in our game, this would involve a significant amount of research into the topic. I had attempted to make a system similar to this before in a college project, but what I ended up with was probably more like Quake II’s movement than Quake.

  I started my research by referencing Adrian Biagioli’s 2015 technical writeup, Bunnyhopping from the Programmer's Perspective, and Matt’s Ramblings’ video The code behind Quake's movement tricks explained. From here I was able to understand that air strafing comes from the weird way that acceleration is calculated in Quake’s engine, and subsequent engines based off of it. Whenever a player wishes to accelerate in a direction, that acceleration vector is added to the velocity vector of the player. To prevent the player from gaining too much speed, the game attempts to clamp the amount of acceleration the player can receive based on their current speed, relative to their maximum speed. However, this is where the error lies. Instead of calculating the current speed as the magnitude of the velocity vector, for whatever reason, it is calculated as the projection of the player’s velocity vector onto its desired acceleration vector. This projection can be manipulated by a skilled player who changes the angle between the desired acceleration vector and velocity vector itself. By manipulating the vector this way, the player can gain near infinite amounts of acceleration with precise mouse movements. This issue with miscalculating the player’s current velocity for clamping purposes, may occur in 1 line of code, but is directly responsible for the most expressive first person movement ever developed.


Diagram showcases the projected velocity as the player manipulates their acceleration vector

Luckily, Adrian Biagoli's write up included a link to both Quake III Arena's and the Source Engine movement code, so I was able to further study them for my C# implementation.

  After implementing this acceleration system myself, and tweaking the numbers to my satisfaction, players are able to perform a number of physics exploits from Quake in Super Shotgun Man. Players can zig-zag by tapping the strafe keys in rapid succession to gain speed. They can circle strafe to give themselves a burst of speed that they can use later. Air strafing is possible by holding a strafe key and turning their mouse into their strafe, allowing players to turn in the air. B-hopping is possible because friction is calculated the frame after the player touches the ground, allowing players to preserve momentum from shotgun/slide jumps. Even wall-running is in the game, where if players run parallel to a surface while holding the strafe key against the wall, they will gain a small amount of speed.


Air strafing being used to reach otherwise unreachable places

  People loved how expressive the movement was from Quake and subsequent engines, so the communities for those games made maps to help practice and push the boundaries of what they could accomplish. Some of those maps involve a technique called surfing, where players would use sloped surfaces as slides, ramps, and frictionless surfaces. This is where Super Shotgun Man’s sliding mechanic would come from. In Super Shotgun Man, players can slide by holding shift. While in a slide, they are locked to that direction unless they jump or fire their shotgun. Jumping gives them a burst of speed to where they are looking, while firing the shotgun redirects their slide with the recoil. Players can also gain speed by sliding down slopes. Originally, players only gained speed from sliding down slopes, but this would cause players to slow down on ramps, which is not very fun. Players still gain speed from sliding upwards, however this never became an issue, because the player is still fighting against gravity and friction so they will eventually slide down the slope after a bit.

The Shotgun

  An FPS game is only as good as its shotgun. We took this especially to heart when designing the double barrel shotgun, “Margherit’.” The shotgun is the most versatile tool the player has in their arsenal as it is the main source of mobility and also the main source of damage. This makes it imperative that it feels great for players to use. We started by taking inspiration from gaming’s most iconic double barrels: Caleb’s shotgun from Blood, Team Fortress 2’s Force-A-Nature, DOOM II’s Super Shotgun, and the Jury-Rigged Boomstick from Deep Rock Galactic.

  We then thought about how we wanted it to function mechanically. In combat, you can fire both barrels individually for less damage, but for faster fire rate. You can also fire both barrels at once for massive damage but at the cost of fire rate and spread. These options also have applications in movement. Firing both barrels simultaneously gives the most kickback, and since momentum is additive, the player can combine this kickback with a slide-jump to get some serious distance. Firing a single barrel is much better for delaying falls, or extending jumps due to the fast fire rate. Firing a single barrel is also really useful in conjunction with the explosive rounds powerup, as it allows the user to “rocket jump” without damaging them too much. Both types of shots fire in square patterns to feel more consistent for players to use. The shotgun also had to interface with the player’s other method of attack, their fist. The player can punch by tapping the ‘f’ key, or hold out their fist by holding the same key. As a punch, the player can use it as a means of finishing off opponents, as it deals less damage than firing a single barrel. When holding out their fist, the player will deal damage to enemies as they move through them. This damage scales with how fast the player is moving. If the player launches themselves with any of the movement tools in their arsenal, their fist can deal damage on par to that of a double shot.

  Overall, a large amount of time was spent on the project’s design. Super Shotgun Man’s movement draws inspiration from a lot of places, but feels unique in its execution. We hope you all enjoy playing it as much as we have enjoyed developing it!

-James "Air Man" Lillicrap

Get Super Shotgun Man 3D

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.