top of page

10/2020 - 5/2021

Multiplayer Physics-Based Burglary Prototype

Unity_edited.png
GitHub-Mark-Light-64px.png
Burglar Thumbnail.png

Engine/Software
Languages
Roles             
Notable Features Worked On

: Unity3D
: C#
: Lead Programmer
: Multiplayer Networking (Photon PUN), Character Controller, Physics, Audio Occlusion, FMOD

About

This prototype was created for an asymmetrical multiplayer idea where a group of burglars would attempt to burglar a house defended by a homeowner. Burglars would have to steal furnitures by carrying them out of the house and into their van, and the homeowners would have to try and stop them from stealing as much as possible. Burglars would have to avoid detection from the homeowners using both lights and sounds, as moving furnitures and running would cause noises that can be heard throughout the house. Eventually, this idea was eventually scrapped (after being redesigned with a top-down camera instead of first-person) due to the complexity of polishing the netcode, especially with multiplayer physics interactions. Certain mechanics, and the first person visuals were heavily inspired by Phasmophobia, although this initial idea came about before its release and before we knew of that game.

Physics

The networking was handled with the Photo PUN library. Most of the networking was relatively simple to do after the initial hurdle of having to get used to thinking of every interaction having to communicate with each other between players. The most challenging part was networking the physics interactions. Physics interactions were largely inspired by Moving Out, especially with grabbing and dragging larger furnitures. There were 3 classes of furnitures, equipments; that you can keep in your inventory and equip (flashlights), grabbables; that the player has to hold with both their hands available but can carry around unhindered, and draggeables; that the player has to grab with both their hands available and pull them to move it.

Equipments are simply "moved" into a player's inventory and requires no physics. Grabbable objects are simply transferred to become a child object of the player and set to is kinematic, although there were plans to create a more robust physics system for it using joints. Dragged objects are much more complicated, which are connected to the player with a configurable joint at the point where the player picked up the object. The joint has its motion limited on all axes, and is moved and rotated based on the player's movements. The camera is also then locked on to the object and the player can no freely longer rotate around themselves, similar to in Moving Out. The weight of the object would then affect how hard it is to drag and move it around.

 

Rotating the object is handled based on the player's mouse input, where the faster you moved your mouse, the more force is applied on the object to rotate it. This gives a sense of weight and effort when trying to drag furnitures around instead of simply being able to press a button on your keyboard to rotate the object. In the video above, for example, dragging the sofa was much harder than dragging the coffee table, and would have required 2 people to drag it. This was however, not completed.

Audio

We also wanted this to be a sound-based game, where players would actually have to listen to the audio of the game to discern important information about other player's whereabouts. As such, sound should play a large role in this game. Two of the main things implemented were audio occlusion and different footstep sounds based on the surface the player is walking on. In particular, audio occlusion's implementation was derived from this video tutorial: FMOD & Unity | First Person Audio Occlusion

bottom of page