During the COVID-19 pandemic of 2020, Allen Pan created a launcher that launches masks onto people’s faces. Around this time, I was experimenting with Unreal Engine 4 and decided the scope of my project was too large.
A Discord server I’m on linked to the Reddit post and highlighted one of the comments:
It occurred to me that this would be a “quick” project to approximate in UE4, so I asked the team if it would be better as an FPS or third-person. Karva said “The only problem is that once this is all over the game would be out of date” and “third person so you can customize your mask.” I came up with the cringeworthy phrase: “maskrotransactions.”
I knew I wouldn’t get to any sort of mask customization, but I started up a new UE4 project with the Third Person Template and got to adding some basic functionality for a Tower Defense game.
After getting basic pathfinding into the game, I created path through some rectangles that would eventually be shelves inside a store. I realized I’d need the AI to do a bit of crowd control, since there were potentially going to be a lot of customers so I used the “Detour Crowd AI Controller” which has some embedded functionality for avoiding other objects. A list of YouTube tutorials that came in handy are at the bottom of this post.
After getting AI pathfinding to work, I wanted to incorporate the mask launching. I followed a few tutorials related to adding a weapon to third person and found it was a bit more involved than expected (as is everything). I did a quick mask model using primitive objects in Asset Forge and threw it onto the default mannequin for the player model, then copied that onto the customer models.
I used Joe Wintergreen’s debug lines tutorial to emulate bullet trails so you could vaguely tell where you were shooting since there was no crosshair and the mask launcher was literally a cylinder in the mannequin’s arms.
When the mask is applied to a customer, I adjust the visibility on the mask and apply a blue hue to the customer’s material so it’s easier to tell at a distance.
I posted the gif on Twitter and Allen Pan (the guy who made the original video) commented on it. I am admittedly not an artist, so I went onto the UE4 Marketplace and found a few grocery store/convenience store looking assets and made some very minor edits.
My computer/UE4 has a weird error where I had to turn off screenspace reflections otherwise there were some pretty horrendous reflections off the pavement.
The Maskening was certainly an interesting side project and ended up taking a lot more time than I thought it would. As of November 4, 2020, the map loads with 2 maskless customers who pick a random route through the store. There’s a trigger you can step on to spawn additional enemies and you’ve got 50 masks in your launcher. The words “Wave 1 of 10” display at the top and there’s no functionality there.
Will I ever work on this again? Probably not! But it was fun and challenging in ways I wasn’t expecting.
Basic Pathfinding and Detour Crowd AI Controller:
UE4 Detour Crowd AI Controller Tutorial by Gustavo Reis
Detour Crowd AI Controller : Unreal Engine 4 Game Engine by Peter L. Newton
UE4 Quick Tutorial – Ai Waypoints by LemonFrost Games
Unreal Engine 4 Tutorial – AI – Part 4 Patrolling NPC by Ryan Laley Games
Unreal Engine 4 Tutorial – AI – Part 5 Patrolling NPC Continued by Ryan Laley Games
Firing and adding masks to customers:
UE4 tute: Drawing debug lines with constructionscript by Joe Wintergreen
UE4 Third Person Shooter Game Project SetUp Part 1 by SG Unreal Creation
UE4 TPS Game Add Weapon and Equip Weapon Part 3 by SG Unreal Creation
Animation Assets – #2 Unreal Engine 4 Animation Essentials Tutorial Series by DevSquad
UE4 / Unreal Engine 4 UMG / Widgets – #01 Custom UMG by Dev Enabled
Screenspace Reflections Issue:
Unreal Engine Forum Topic by BrokenTripod