Contractors pushes VR shooters forward with amazing graphics and polished gunplay
We got a chance to interview Project Lead Weihan Ding and Lead Programmer Cong Ku. The two share tips on how they achieved the game’s high visual fidelity while keeping VR’s steeper performance requirements in check, discuss how they designed a shooter around VR’s strengths and weaknesses, and more. Thanks for your time and congratulations on all the success that Contractors has had in Early Access thus far. Lots of players are stating that Contractors sits in the sweet spot between being a hardcore and casual shooter. Was this your intention designing the game?
Project Lead Weihan Ding: Yes. We wanted to distinguish ourselves from other VR shooters. There are two things we needed to consider. First was the TTK (time-to-kill) rate and the other was game modes. Right now Contractors offers a Control Mode for a competitive hardcore playstyle and a Playground Mode that offers modes like Team Deathmatch and Gun Game for more casual play.
Contractors features arguably the best graphics of any competitive VR shooter made thus far with amazing textures, lighting, and particle effects. How did you achieve that level of graphical fidelity? Did you feel like UE4 gave you a graphical edge?
Lead Programmer Cong Ku: For Contractors, we strictly followed the PBR workflow. We used Substance Painter for some weapons and props. For scene assets and textures, we used lots of photoscanned assets from Quixel Megascan. UE4 provided all the modern rendering features as well as the amazing material and particle system. Just making a material template and dragging those assets into a scene provides a foundation that looks great.
Despite Contractor's high-graphical fidelity, users are praising how well-optimized and smooth the game runs. Considering VR's steeper system requirements, how did you keep performance in check?
Ku: For rendering, here are some tips that helped us. We started with asset optimization:
- Make sure scene meshes with high poly-count have proper LODs. This is important especially when using MSAA, since complex meshes also tend to result in more overdraws around triangle edges.
- Make sure Materials have reasonable shader instruction counts. Disabling the "High Quality Reflection" option can save lots of shader instructions. It's worth doing with materials for small props or rough surfaces. Enabling the "Fully Rough" option could also save lots of shader performance. We did it with almost all of the foliage materials.
- Combine meshes that use the same material into a single mesh when necessary to save draw calls.
We also made two engine-level optimizations:
- We used the "Foveated Rendering" for VR rendering; enabling it gave us a small GPU performance boost.
- We added an additional dynamic res translucency rendering pass for scene translucency effects. And the UIs are put in another full-res rendering pass. Scene translucent elements will be rendered at quarter resolution if their rendering pass is using too much of the GPU budget.
For gameplay, we found the following practices helpful:
- Avoid using components with "Generate Overlap Events" enabled. Updating those overlap events is very expensive on moving objects.
- Don't set an actor/component's transform more than once in the same frame. When characters and intractable objects have lots of child components and a deep component hierarchy, updating its transform more than once will yield a high performance cost. Avoid doing things like SetRelativeLocation(...) then SetRelativeRotation(...), use SetRelativeLocationAndRotation(...) instead. Using FScopedMovementUpdate can also avoid updating child transforms unnecessarily if you really need to modify components’ transform multiple times in the same frame.
- Nativize some compute-intensive Blueprints using the "Blueprint Nativization" tool.
Contractors features an impressive inverse kinematics system that renders the entire body, which is something many VR games avoid with only three points of contact. How did you go about implementing it in the game?
Ding: We used a third-party plugin to help us save a lot of time with inverse kinematics. We spent quite a lot of time discovering how IK works and tuned it carefully together with the skeletal mesh created by our artist. Unreal’s Animation Blueprints also provide great additional tools to control our IK system.
Handling, reloading, and shooting weapons in the game feels great. Did you have to do a lot of prototyping to get them right in VR?
Ding: We did a ton of prototyping. We consulted with gun experts for feedback on how specific weapons handle, how they recoil, and took notes on details like RPM. We wanted to ensure each weapon felt true to their real-life counterpart; there is even a bolt release button on weapons like the M16, where you can use your controller to tap a button to complete a bolt release.
The Unreal component system also made assembling weapons quite easy. After we implemented all the tools, we just needed to add a bolt component, a trigger component, a front handle, and weapon body, and voila! A primitive weapon is ready to go! This helped greatly in the prototyping stage; the weapon parts are easily interchangeable, and we were able to get feedback from alpha testers to make changes swiftly.
Contractor’s current maps are diverse and fun. Can you talk about your approach to creating maps for a competitive VR shooter?
Ding: One of the biggest features for a VR shooter is the immersion; when you are ducking behind cover, you are actually ducking. When we designed maps for Contractors, our main goal was to not break player immersion. We added a ton of cover in our maps. Players need to constantly look in all directions to detect enemy movements, which means they need to act cautiously throughout the game.
Secondly, we designed our map layouts based on game modes, which means we needed to really think about where to place spawn points, objective locations, and choke points in order to avoid one side having an unfair advantage.
Were the maps and gunplay designed around close-quarters or long-range combat?
Ding: In VR, the pixel resolution is relatively low, so we mainly focused on the 30-60 meter medium-range combat so that players can more clearly see their targets when aiming down sights without a scope. In the game, players are able to choose a light armor vest that allows you to carry a secondary weapon, so we also designed some sniping spots for long-range shootouts in addition with in-door objectives for close-quarters combat.
Can we expect more maps in the future?
Ding: Definitely! We are updating Contractors on a monthly basis. There will be many more maps in the future.
What do you think of UE4 as an engine for VR development?
Ku: It's great for VR development. UE4 has great support for various VR platforms and it's easy to switch and test for each platform.
Does the team have any favorite UE4 tools or features?
Ku: The Blueprints system, as a whole, is brilliant. It's very easy to form a workflow with it. For example, when we are making weapons, a programmer can make some base actors and components in C++, expose some parameters/function to Blueprints and create some component visualizers if necessary. Then a designer and artist can play with parameters/exposed functions to change a weapon's behavior right away. Another thing we can't praise enough is UE4's profiling tool. It has everything we need to know about our game's performance.
Was the Unreal Marketplace helpful in any way?
Ding: The Unreal Marketplace has been so helpful for a small game studio like ours, it provided so many high-quality assets and saved us tons of time on both prototyping and the final product. Big thumbs up to Epic Games for introducing the monthly free assets!
Was it helpful to the studio to have access to UE4's source code?
Ku: Absolutely. Being able to study and modify the source code has helped us solve many otherwise "unsolvable" problems. It's much easier to add some game specific engine-level modifications/functionalities that way.
What's the biggest thing you've learned developing the game thus far?
Ding: That would be the way we perceive VR. It’s a great platform and there is huge potential in it. We are looking forward to seeing how the industry progresses in 2019.
Thanks again for your time. Where can people learn more about Contractors?
Ding: You can visit our website: http://contractorsvr.com/ or our Steam page: https://store.steampowered.com/app/963930/Contractors/.