Portfolio Details
Project information
- Category: GameJam
- Project date: 27 Oct, 2024
- Project URL: https://mrwhitenoiz.itch.io/frightfall
My role in Fright Fall
Fright Fall is a short horror game where you play as a detective investigating mysterious disappearances in a theme park. You will embark on a terror dark ride and search the facilities for clues.
I was in charge of programming everything related to the actual ride, the backbone of the game. I also was responsible for the settings.
Roller-coaster
Originally, the game would allow you to travel between different stops, allowing the player to choose the stop, and even to go backwards (that's why there's a button pad in-game). Even though the feature exists, since it's a gamejam game, it went unused in favour of a more controlled and less ambitious story.
Making the path
Thanks to Unity's spline system, the path can be easily expanded on. The main path exists on a spline, and multiple splines can be connected to knots to create alternative paths. Knots also lets us define where the cart should stop, and even control the speed of the ride.
To move through the splines, we use the CurveUtility class. While it might be tempting to directly interpolate positions with EvaluatePosition, that wouldn't work on curves, since they don't change linearly. Before that, we have to get an accurate interpolation value through CurveUtility.GetDistanceToInterpolation to ensure we are moving equal distances each frame.
Player riding and aiming
In theory, to make the player ride the roller-coaster, we just need to make it a child of the cart. Unfortunately, this comes at the price of gamefeel During the attraction segments of the game, the player is expected to shoot at targets throughout the scenery. If the player always follows the rotation of the cart, aiming during curves makes it feel like something is pulling the camera away. To solve this, I implemented a system that only rotated the player's camera when the player isn't rotating it horizontally. With this custom rotation, the camera doesn't change pitch with the cart. This change made sudden drops of the cart more noticeable and impactful, since the cart won't stay in the same relative position in the screen. It's specially helpful in dark spaces, where other frames of reference are limited.