SoundPulse is a visual scripting system that I created so our audio designer could work on the game without having to be involved in code. With SoundPulse, I wanted to achieve several goals:
- Tweak and create new sounds with the game running
- Provide a way to program sounds without having much experience
- Create a portable framework to handle sounds in all my game projects
Let’s go over the system, it’s workings and the results.
Introduction & basic functions
The Pulse refers to a signal pulse that activates nodes in the visual scripting system, which runs it’s code based on input parameters and outputs results.
Like all visual scripting systems, SoundPulse works with simple drag and drop actions. Right button for a contextual menu and adding nodes with a simple search command.
Setting up a simple system in SoundPulse
Linking the visual script to the game is done through a Sound Call Receiver. This is usually the first step in setting up a script.
Setting the call for a Sound Call Receiver, unhandled calls are colored red
SoundPulse works by receiving sound requests coupled with data from the game. These requests trigger sound call receiver nodes that generate a pulse from the request and output the bundled data.
A Sound Call Receiver which passes data to an Audio Player node.
SoundPulse runs realtime as part of a game. It is accessed with the game running and sounds can be added or tweaked at any time.
All data in SoundPulse can be altered or generated with visual scripts. This gives a lot more control and allows for easier iteration. Another benefit is faster iteration, by working directly within the game, the result of any changes is immediately observable within the game’s audio space.
Design, workings & code
SoundPulse was designed as a mobile, standalone sound engine for Game Maker Studio 2. It can be easily imported, only needing a little configuration by the user.
Audio files are imported into the engine and automatically grouped (on load) into sound groups, based on naming conventions. This automatically groups sounds and provides a clear and consistent workflow. For example, it makes it easy to identify sounds that need alternates to prevent sound repetition.
The engine was written in GML and runs natively in Game Maker Studio 2. SoundPulse is called with a simple function call, not much different than how normal sound calls are done, but then gives far more control for the audio designer.
Adding new nodes for the visual scripting system is easily done through code, making customising the engine for specific needs very simple. Configuring the node items (name, input, data visualisation and output) is done in one script. Coding node behaviour is done in a second script based on in and outputs. This splits behaviour from the visual interface, allowing for clean and efficient code.
Results
SoundPulse simplifies working together with sound designers by proving a powerful tool that works within the game, eliminating much of the complex workflow that previously existed.
With this project, I designed and created a visual scripting system for audio, learning about both visual scripting systems and their implementation. SoundPulse is a powerful tool for cooperation with audio designers and a simple way to program audio in a variety of projects, enabling quick testing and iteration.