Devlog 3: Jazmine Chargualaf: Reworking Item Colliders & Setting Up a Sound System


Item Collider Overhaul

One of the first problems I focused on this sprint was getting weapon and tools to behave properly in the world. Before this update, they were static and floating, making them feel disconnected from the environment. Additionally their box colliders were either too big or too small, leading to awkward interactions. Another problem was that whenever we create another item derived from the pickup base, the item would fall straight through the world, which made reconfiguring physics and collision a repetitive step. 

To address this, I reworked the pickup base system, ensuring all child actors have consistent physics and collision properties. Now the pickup base class includes two default components: the mesh and the box collider. The mesh is the root object, allowing proper physics interactions, while the box collider is attached as a child, ensuring accurate pickup detection. These components also have the correct collision and physics settings, so newly created items no longer call through the world and can interact naturally with their surroundings. This update makes item behavior more intuitive and will also make creating new items much easier moving forward, since they will automatically inherit the correct properties.

New CodePickupBase Constructor
Previously the BoxCollision was the RootComponent.

Building a Dynamic Sound System with MetaSounds

Although I added a looping background track last week, the game felt incomplete and lacked immersion without more audio feedback. Without sounds, actions like walking, sprinting, breaking objects, and picking up items had no satisfying audio cues, and its absence gave an eerie feeling. Implementing more sounds was my main priority this sprint and I needed to build a solid foundation for the sound system that is flexible and scalable for future expansion.

I spent a few hours researching the various way to implement sound and music. To begin with I started by using Sound Cues, but read that feature will be removed in the future, and shifted towards using MetaSounds so our game is future proof in the event we continue development after graduation. 

I first created a WorldAudioComponent to replace UE5's default AudioComponent I previously added to BP_WorldData. An important feature for the WorldAudioComponent that I wanted to have available is the ability to dynamically start, stop and transition based on location or event triggers (to come). At the moment there is only one function PlayBackgroundMusic() and one variable CurrentBGM. PlayBackgroundMusic() stops any currently playing track before fading in the new one to create a smooth transition.

PlayBackgroundMusic() Code Snippet

The next thing I did was create a PlayerAudioComponent which is responsible for managing and playing sounds tied to player interactions. It contains predefined MetaSound assets for footsteps, item pickups, and object breaking, which are stored as editable variables. These sounds are triggered dynamically based on the player's actions. For example, when the player moves, the component checks if they are sprinting or walking and plays the corresponding footstep sound with a slight delay between each step. Similarly, when an object is broken, the component broadcasts an event to play the appropriate break sound, allowing flexibility for different object types to have unique audio feedback. The system is designed to be modular, making it easy to expand by swapping out sounds or adding new ones.

PlayPickupSound(), PlayBreakSound(), and PlayFootstepSound() Code Snippets

The final step was to just integrate these function calls and broadcast events at the correct moments!

Adding the Footstep Sound when the player moves!

Adding the Break Sound when the player successfully hits a breakable object! 

Finally, adding the Pickup Sound when the player picks up an item!

Next Steps

With these foundational improvements in place, my next sprint will focus on getting the player to hold items, implement functional tools and weapons, and improve dynamic region audio. I hope these additions will make the game feel more immersive and responsive. 

Until next time,

Jazmine Chargualaf

Get Echoes of Creation

Leave a comment

Log in with itch.io to leave a comment.