College Capstone Dev Diary:  New Guns and Grabbing System

College Capstone Dev Diary: New Guns and Grabbing System

Cash Force is a high-octane arcade VR shooting game where you take the role of an undercover cop gone rouge fleeing the scene of a heist in a colorful 70’s crime film esque setting. Defend your stash of cash from pursuing thugs using an assortment of highly intractable weapons. Lock, load, and shoot your way through waves of pursuing enemies as you engage in combat out of the back of a moving heavily armored van, using the doors and other supplies as cover. Carefully plan your escape route before fleeing the scene of the crime, but remember, the higher the risk, the higher reward! Earn cash from performing skillful shots on enemies, allowing you to purchase upgrades and gadgets to improve your weapons and van. But be careful: the more damage the van receives, the more cash you lose, and its game over if you run outta’ cash! 

 

Finalizing Our Greenlight Requirements

The past two weeks have been alot of fun for myself and the team, mostly because….

…we actually got to make something!

In my last post, I mentioned at the end that the first 4 weeks or so had been largely documentation heavy in order to solve remaining problems from the previous implementation last semester in order to pass our Greenlight milestone and continue into full production. While this documentation is absolutely essential for the team and is going to be extremely useful, for me personally it was a lot less fun than actually getting my hands in the build and making stuff. So, once we had all those docs, it was time to bring them to life in some quick prototypes to prove that everything we wanted in the game was viable and feasible to accomplish in full production. 

Each member of the design and programming teams all took on tasks for programming various proposed systems in the game. Emmett took the reigns on re making the safehouse in order to facilitate all the new mechanics we had planned. Harry tackled a prototype interface for mission planning and selection interface that players use before going into the van and fighting enemies as well as the new sling system with Kelly. Lauren prototyped the new watch UI system that lets players easily see their health and cash values. Joe finalized the enemy types and upgrades for the game and simultaneously prototypes all of the new enemy types. Josh worked on prototyping our map generation algorithm while Cameron did AI and Michael continued building our gun tools. Finally, as for myself, I was tasked with prototyping the new gun types we wanted in the game as well as building the proposed grabbing system redesign, both of which are tasks I was super excited to finally dig into!

 

New Guns

Our biggest criteria for the guns for Greenlight was to effectively prototype the different types of “experiences” that the different guns would provide to players. We identified three different experiences based on how the guns operate, feel, and their roles in the game:

  1. Sidearms: Starting weapons that also serve as a backup. Relatively low damage and made for shooting at closer targets
  2. Rapid Fire: Weapons that can put a lot of shots down range quickly and efficiently. The original SMG and Tommy Gun both fulfilled this role, and two of the new guns (Battle Rifle and LMG) also fit into this category. These are one of the two primary weapon types players will use during the game, with sidearms being relegated to situations where primaries are either unusable or less efficient.
  3. Manually Operated: Heavy weapons that pack a serious punch but lack speed and efficiency. The shotgun and bolt action fit into this category and are designed for players that like to deal a lot of damage at once instead of over time. Less accuracy focused players will love the shotgun for its high damage and spread function whereas precision focused players will prefer the bolt action rifle for its pinpoint accuracy and instant kills. Both weapons must have their action manually operated in between shots, hence the name.
Since we had already proven the Rapid Fire experience with the SMG and Tommy Gun last semester, I focused on prototyping the Sidearms and the shotgun to show off Manually operated weapons. Here’s the results of some rapid prototyping with the old gun architecture from last semester

The first gun I prototyped was the main Sidearm type weapon: the Semi Auto Pistol. This is the first weapon players will have access to in the game, and it features a low mag capacity, high fire rate, and moderate damage. Its very accurate and has low recoil, making it a great all around starting weapon.

The second prototype I made was for the other sidearm weapon: the Revolver. With enough damage to kill in two body shots, the Revolver really packs a whollop. This comes at the cost of huge recoil and low accuracy between shots, making it a deadly weapon in the hands of a precision shooter. The Revolver features a unique mechanic as well; in between shots, the hammer must be manually cocked by flicking the thumbstick of the held controller down to simulate the cocking of a real hammer! We also went for a fun take on reloading; instead of manually loading rounds into the cylinder, we went with a more cartoony reload where the entire cylinder is simply removed and replaced with a new one!

For the Manually Operated guns, I only made one prototype to show off how both of them would work. I used the shotgun as an example; whenever the player shoots, they can’t shoot again until they manually interact with the action, in this case the pump. This prototype wasn’t as in depth as the other two since the old grabbing system is hot garbage and wouldn’t work properly with it, but the core concept of the mechanic has been proven as doable.

Quality Grabbing and Interactions

Perhaps the most important of our Greenlight criteria was to rebuild the grabbing system, which last semester was a buggy, terrible, horrible, spaghetti filled mess of code that didn’t make any sense and was impossible to work with. Grabbing is the core system of the game which everything else depends on, so having a prototype of a finalized implementation of the system was absolutely essential. With the help of Kelly and Josh, I managed to effectively prototype most of the logic for the new system with great success!

On a high level, the system operates off of the idea of “sockets”; that is, parts of an item that players can grab. Sockets have types, ranging from primary grip points to secondary grip points and handles/attach points. The hand objects then line trace for any socket objects and mark the last hit one as the “intended object”, preventing any other object besides the intended object from being grabbed. This completely eliminates the bugs involving guns getting stuck to player’s hands and the god forsaken trigger enter/exit logic I had to deal with all of last semester. Seriously, that shit gave me nightmares.

Currently I’ve got everything described above working flawlessly in engine. Different socket types do different things, objects are grabbing with physics, two handed tracking works, and more. The only thing missing is some logic for letting go of the first hand when grabbing with the second hand, but I’m in the process of figuring that out again. Here’s some GIFs of how it looks!

Beautiful grabbing, that not only works at distance but also uses physics! Held guns will collide with the environment now
Grabbing the bolt to show that different sockets do different things successfully!
Physics based two handed tracking at long last!

As far as I’m aware, we’re the first team to crack the code on actually working physics grabbing of guns in Unreal to this level of fidelity and modularity! I really want to write up a full blog post tutorial on how this system works in the future once its fully implemented, so if you’re reading this and looking for more tutorials from me (like my shotgun game stuff), stay tuned for that in the near future!

Attachments Prototype

Another core system of the game we needed to prototype was the attachment upgrade system. Thanks to the new grabbing system, it was super easy to show this off; I simply made it so any item marked as an attachment will snap to attachment points and can be removed from the gun at will! This proves how modular and useful this new grabbing is, and once its implemented on top of the old shooting mechanics, will speed up the workflow of all other player related mechanics drastically!

Simple attachment system demonstration with a scope!

Upcoming Week Plan

We had our Greenlight presentation on the day of this writing (2/20/20) and successfully passed through it, meaning we’re now in full production! The first order of business for myself and the programmers is to implement the new grabbing system into the main branch and get the guns working with it, as well as hooking up all the new gun architecture and tools to make gun creation and usage seamless! The rest of the designers will be working on game feel when hitting enemies to get that feeling as satisfying as possible since its really the heart of the game.

See you next time,

-Karl

Leave a Reply