Details

Engine: Unreal Engine 5.4

Team Size: 15

Duration: 32 weeks

Role: Programmer

Dates: August 2024 - April 2025

Rockstars!

Glass Record Studios

Game Poster

Rockstars! Poster

Gameplay Video

Game Description

The player takes on the role of the lead singer/guitarist in a wandering band of space hippies on their way to the gig of their lifetime, the Protostar Palooza! In what is essentially a cosmic Coachella, bands from around the galaxy gather in one place to witness the forming of a protostar, and get this, they’re the opening act!

While on their way, their rocket minivan smashes into an asteroid and crash lands on a mysterious new planet, leaving the player and their other band members scattered on its surface. With the gig starting in only 4 hours, it’s up to the player to round up the troops, repair the ship, and head back into space before their chance is up!

The player has access to a grappling hook via the special ability of their mic instrument, which can be used to grapple to targets that are placed around the map.

The event tick of each grapple target begins by checking if the player is in visibility range of the grapple. There is both a visibility distance and a player grapple distance (point at which target can be grappled to) to allow the player to see targets before they can be used.

A line trace is then done from the target’s location to the player’s location to ensure that there is nothing blocking the target’s line of sight to the player.

Once the above two check are true, a range indication function runs, which varies the size of the grapple target based on the player’s distance to it. The varying size of the grapple helps to convey to players how close they are to being able to grapple to the target.

Next, the grapple makes sure that the player is holding the correct instrument. If the player isn’t holding the mic, then the target is made red to indicate to the player that they cannot grapple to the target with their current weapon. However, if the player does have the mic out, then the target is made visible. Once the player reaches the range at which they can grapple to the target, the target’s color changes to a more noticeable green.

To initiate a save, an actor first requests a save, which begins by checking the save type. If the type is game, all actors with the saveable interface are found, and then passed on to the save data bp.

In the save data bp, the save function in the saveable interface is called. The save data bp is passed as a reference in the function call to give the saving actors a reference to the save data. Using the save data reference, the actors set its variables with what they have.

Once all actors complete their saving, the save game function is called, in which the save data is actually written into the save file. In the save game function, the game is either saved synchronously or asynchronously, bool that is checked when the function is implemented. When getting the file to save the data to, the game save name is used as a game save type is occurring.

When the save has been completed, a message is sent out to all bps that are listening for when the save is done. Once the message has been received, those bps then execute functionality they want to run once the game is saved.

The same process is done for a settings save, except all widgets with the settings saveable interface are found, and the settings save file name is used when writing to the file.

Loading follows a similar process to the saving, except it loads data from the files, rather than saves to it.

When someone adds the sound notify to an animation, they are given a few customization options. First, they can check a box to use a random sound. When checked, an array appears that they can populate with what sounds should be randomly chosen. Doing this disables the ability to select a single sound to play. If someone wishes to go back to only playing a single sound, they only need to uncheck the use random sound box.

The second customization is where to spawn the sound (the anim notify uses play sound at location). By default, use actor location is checked. To use a custom spawn location, simply uncheck the use actor location box and type in the x, y, and z location to spawn at.

The next set of customizations are for min and max values for both volume and pitch of the sound. When the sound is played, it will randomly choose a float value between the min and max values that were inputted. By default, it is set to one, so there is no variance is sound or pitch.

Another customization is the start time of the sound. If the audio clip being used has dead space in the beginning, for instance, then altering the start time will help eliminate it.

The final customization is the attenuation settings on the sound. When playing a sound, you may want it to feel like it’s in the world with the player. By adding attenuation settings, the sound will essentially become 3D, making hearing the sound feel as if it’s coming from certain areas in the world.

Rockstars! has a number of different sounds that are played, and many of them are done through anim notifies when certain animations occur. Creating an anim notify for the team’s use cases, helped quicken the workflow for implementing new sounds into the game. Instead of needing to program a notify themselves, team members could simply add a notify to their desired animation, customize a few properties, and make their sound play as intended with minimal effort.

An added benefit of making the anim notify in c++ rather than blueprints, was the customization of properties in the inspector panel. Blueprints do not have the functionality to hide or show certain properties based on booleans, which would have made the inspector panel more confusing when trying to implement a sound.

The anim notify was a valuable addition that helped to optimize the team’s audio implementation workflow.

Code Snippets

Grapple Target Visibility

Having a grapple target that communicates information to the player such as, where the target is, and whether or not the player can grapple to it, aids the player in better understanding the usage of their grappling hook.

Saving and Loading System

Saving and loading data is a crucial thing to many systems in games, and is especially important for letting players continue from where they let off when playing.

Creating a system that is scalable and easy to implement makes adding new types of save data, and testing the system much easier. If a system is overly complex, or does not allow for future expansion of new types of data, then it would become a headache to add new things to save files. Additionally, a lot of time would be taken away from developing other mechanics that would further the game.

Rockstars! uses saving so players can continue the story without needing to restart every time. When the saving and loading system was built, the team knew that new types of data would be added to the system as time went on. When new things were added, it was not a headache to integrate them into the existing system. Instead, it was a quick and easy setup to get everything saving and loading.

Anim Notify for Playing Sound