Technical Designer
Project Roo (Prototype)
Unity 3D — PC
January 2020 - March 2020
Team of 3
Unity 3D — PC
January 2020 - March 2020
Team of 3
Description
Project Roo is a proof-of-concept prototype of a first-person, action-adventure shooter with mobility and speed at its core. In Project Roo, you control an agile bounty hunter who can run and jump on walls. With an arsenal in your pocket, the endless ranks of evil you face don't stand a chance. The project was inspired by Doom (2016), Titanfall 2, and Destiny 2 and features a parkour-style character controller. Its UI and level design was inspired in part by Metroid: Prime and Doom (2016).
As technical designer on Project Roo, I was responsible for implementing many of the core gameplay mechanics. I implemented the parkour character controller, scriptable weapon pipeline, combat mechanics (shooting, health, damage, etc.), weapon animations, a playtest telemetry script, and first-pass gameplay UI. Once created, I also maintained and extended the code base to allow other designers and programmers to modify the core behaviors to suit their needs.
As technical designer on Project Roo, I was responsible for implementing many of the core gameplay mechanics. I implemented the parkour character controller, scriptable weapon pipeline, combat mechanics (shooting, health, damage, etc.), weapon animations, a playtest telemetry script, and first-pass gameplay UI. Once created, I also maintained and extended the code base to allow other designers and programmers to modify the core behaviors to suit their needs.
Parkour Character Controller
The greatest challenge for this project was undoubtedly the character controller. The player needed to be able to run, jump, wall run, wall jump, and slide all seamlessly. In reality, the full effect of the Parkour Character Controller is achieved only by including its camera controller as well. In addition to basic look functionality, the camera controller also handles effects like dutching the camera when running along a wall.
Let's run down how the character controller works:
Let's run down how the character controller works:
- This character controller is a rigid body, physics-based character controller. The rigid body is not kinematic.
- Ground check is being handled by a simple Physics.CheckSphere whose location is set to the position of the Transform variable Ground Check.
- Jump input is captured in the Update method, but all physics operations are being done in FixedUpdate.
- Jumping is handled in two different ways: one for jumping while grounded and another for jumping while touching a wall.
- A wall jump is subject to some dampening (controlled by the variable Vertical Dampening) and a strong push in the opposite direction of the wall (controlled by Wall Push Scalar).
- A combination of scaling air drag and a strong wall push force creates a satisfyingly sharp jump but keeps the player relatively close to the wall.
- While on the ground or on a wall, the player is being gently pushed into whatever surface they're colliding with.
- This helps give the character controller a sort of 'stickiness' and keeps physics objects from knocking the player around during tight maneuvering.
- Whenever the player collides with a wall, I flip a flag and find the intended wall-run direction with the following:
- Find the cross product of the collision normal and world up (projected velocity).
- If the dot product of projected velocity and the rigid body's velocity is less than 0, multiple projected velocity by -1.
- Wall run direction is projected velocity normalized.
- While the player is flagged as 'wall-running', their stickiness force is directed at the wall they're running on and their velocity is locked along the wall run direction calculated above.
Scriptable Weapon Pipeline
Project Roo makes use of Unity's scriptable object class for all its weapons. This allows us to create and modify weapons as Unity assets in the editor with ease.
The scriptable object class is a data container useful for holding large amounts of unchanging data. They function similarly to a serialized struct, however they operate independent of class instances. For example, a prefab loaded with a serialized struct holds a copy of that struct in memory whenever it is instantiated. Prefabs with scriptable objects contain references to their data container, saving on memory at runtime. On top of all this, scriptable objects can initialize and call methods while a normal struct cannot. For Project Roo, all the core functionality and properties of our Weapon class existed in a single BaseWeapon scriptable object. New weapon assets could be created from a right-click context menu in the editor, and all properties of that weapon could be set in the Unity Inspector. |