Dilating Rifle

Made in Unity as a portfolio piece in about 8-10 hrs, with scripting done in C#

In a talk by Jan Willem Nijman, he suggests that if there is no reason to let go of the shoot button, than there shouldn't even be a shoot button; it should just shoot forever automatically. This gave me the idea of a weapon that would transform while you hold down the shoot button, needing the player to strategically hold down or let go based on situational needs.

Goal

The base prototype has generic FPS movement and aiming. What is more unique is the Dilating Rifle. The Dilating Rifle would rest as an accurate, long-range, low rate-of-fire weapon. However, as the player holds down the shoot button, the rifle would gradually evolve from that long-range rifle, to a less accurate, medium-range, medium rate-of-fire machine gun, to an inaccurate, short-range, extremely high rate-of-fire gatling gun, and everything in between, all while shooting. If the player continues to hold the shoot button for too long, it would become overloaded and be ineffective until the player lets go of the shoot button. After letting go, the rifle would transform quickly backwards until it is at rest as the long-range rifle or until the player presses the shoot button again.

Dilation

The rifle's dilation is almost all done with Unity's animation curves. When the player holds the shoot button, a timer starts. The dilation scripts get their current accuracy, range, and rate-of-fire info by inputting the timer's current time into these animation curves. It's honestly pretty simple and straightforward. The most challenging part was getting the balance right.

Balance

There are three different animation curves, one each for accuracy, range, and rate-of-fire. These being animation curves, it's super easy to go in and tweak them. A lot of it was just messing and seeing how it felt, but in the end, each graph has a similar but unique curve. They have rounded plateaus that subtly, but meaningfully, give each trait a sort-of stage (sniper, machine gun, and gatling gun). It doesn't hold long enough in one spot to give the player the impression that there are three distinct settings, but it does allow the player to aim for specific parts of the evolution progression.

What's Cool About This

The player can fire what is basically three weapons in one. They have to strategize with their timing to make sure they have their rifle evolved to the right spot for the right situation. If there is a big, hulky enemy approaching, they have to evolve the rifle so that it becomes a gatling gun, shooting enough to take the enemy down effectively. But after taking that enemy down, the player may need to quickly release the shoot button so they can use the long-range stage against some distant snipers. Meanwhile, they might be getting charged by some little fodder enemies, and so the player may need to pulse the rifle up to the medium-range machine gun. There's so much cool situational strategy that just comes naturally from this weapon.

Conclusion

This is one of my favorite prototypes I've made so far, and to be honest, I've had it on the back burner for several years. I think this could be a great main weapon in a Doom-like arena shooter.

Previous
Previous

Stealth Cover System

Next
Next

Melee Combat System