Frolf is a top-down multiplayer mini-golf game where four players play in two teams, each with a golfer trying to complete the course, and a blocker that uses obstacles to interact with the golf balls. The game systems and levels were made for a previous class in the MSU Game Design and Development Minor. For this study, I added an extra tower obstacle that fires projectiles, and also developed a designer friendly system to create custom towers.
Bomber Tower
The bomber tower was developed to fix a design issue that the Frolf team had during development of the game in a previous class: Blockers often had nothing to do and were just waiting for golfers to approach an obstacle. This solves that problem by allowing blockers to aim shots at golfers from a range.
When a blocker selects a bomber tower, they control the aiming indicator with the right stick, and then they can fire a projectile towards the indicator. On impact, if the projectile is within a set radius of any golf ball, it applies a force to the ball and fires it into the air.
Bomber Tower (cont.)
These variables are easily changed in the inspector for the bomber tower, allowing designers to change how fast the aiming indicator moves, the max range of the tower, the time for the projectile to land, the radius of the explosion, and the force applied by the explosion.
Due to the way Unity prefabs work, it's also very easy to standardize these variables for all instances of the bomber tower, and also to set specific values for specific towers. A larger level might need a higher explosion strength, and setting those towers in that specific level would be very easy.
Another fun note about this tower is the projectile. Because I have a set time to land and a set gravity, I had to break out the physics kinematics equations to solve for horizontal and vertical velocity. It was very satisfying to get it working as quickly as I did. My high school physics teacher would be proud.
Custom Tower System
The custom tower system was an extension of this project, as I had extra time and wanted to make a more designer-focused tool.
The custom tower system operates on triggers and effects. Designers can check boxes to enable triggers such as "Ball enters trigger" and "Blocker activates." These triggers also work in tandem, so if both are activated, then the effect will only activate if a ball is in the trigger and a blocker activates the tower.
The effects are what happens once the trigger condition is met. The three currently implemented are bounce, speed boost, and teleport. Bounce gives vertical speed, speed boost multiplies the ball's speed by a set value, and teleport warps the ball to a set position. These can also be used in tandem, so a trigger can activate a speed boost and a bounce. In the gifs to the left, you can see that by simply clicking two boxes, I can change a custom tower from a speed boost when a ball is in the trigger (top gif) to a teleport (bottom gif).
Adding additional triggers and effects is also straightforward for programmers, as the trigger check function can just add any new triggers, and new effects can just be slotted into the effect call function.