← Implementation

Personal project / UNITY / WWISE

Magic Gems Duel

Work in progress

An elemental magic duel in Unity and Wwise, combining sound effects, audio implementation and game design.

Project focus
Sound design / Audio implementation / Game design
Tools
UNITY / WWISE

01 / GAMEPLAY REEL

Gameplay · All five elements

0:46
Explore the elemental attacks in the training environment. Listen to each element’s character, from casting to impact. Watch with sound on.
Fire charge in Unity
Fire
Ice charge in Unity
Ice
Water charge in Unity
Water
Thunder charge in Unity
Thunder
Wind charge in Unity
Wind

02 / GAMEPLAY REEL

Elemental Duel — battle

0:59
See the sounds in an actual battle, with elemental switching, attacks and hit feedback working together during play. Watch with sound on.

PLAYABLE DEMO

Play it. Hear it respond.

A Windows demo with the elemental-magic training room and Elemental Duel.

Magic Gems Duel · v3 · Windows x64 · ZIP · 116 MB

Extract the entire ZIP, then run “3C Magic Arena.exe”. Keep the Data folder and DLLs beside it. No Unity installation required.

Where to go & controller controls

Training room: follow the violet path to the right. Battle: walk ahead to the central hub and press RB to open the arena menu.

LS / RS
Move / camera
A / B
Jump / dodge
RT
Cast; hold to charge
RB
Take or swap gem / menu
D-pad ← / →
Select element in duel
Start
Pause / resume in arena

Xbox-style button labels. Full controls are in the included README.txt. Melee and ranged weapons are excluded from this build.

Wwise project

Download the Wwise 2025.1.9 authoring project and original audio files using the Windows demo passcode.

PROJECT OVERVIEW

Designing the sound of combat.

Magic Gems Duel is my personal game-audio project in Unity and Wwise. It combines five elemental magic types with a playable duel arena and a training room. I create the sound effects, implement their behavior and design the gameplay they respond to.

My aim is to make each action easy to understand through sound: the character’s movement, the release of an attack, and the moment it connects with a target. The project lets me develop both the sounds themselves and their behavior in the game.

Watch the training and battle reels ↑

Audio implementation

Short and charged spells

There are two types of magic spells: short and long. Fire, Ice, Water, Thunder and Wind share this structure. The Fire Gem shows how each part sounds in play.

Short spell
2 parts
Shot → Hit
The shot sounds on button press. The hit sounds where the projectile lands.

Long spell
4 parts
Cast → Loop → Release → Hit
The cast opens the charge. The loop sustains while the button is held. Releasing launches the charged spell, and the hit marks its collision.

Try the magic gems

Short Spells

Shot and hit sounds in Wwise

All five elements use the same shot-and-hit structure. The screenshots below use Fire as an example.

The short Fire spell uses two sound effects. Shot (fire_shot.wav) plays when the player fires. Hit (fire_impact.wav) plays when the fireball strikes a surface. Each has its own Wwise Event, so the time between the sounds depends on how far the fireball travels.

Wwise Short folder with the impact and shot containers, the selected shot sound and its WAV source
Audio hierarchy · The sound effect used for the quick shot.
Wwise fire_shot Event with a Play action targeting the shot container
Event Editor · The launch Event targets fire_shot.

How Unity plays the Fire gem’s shot and impact

The short Fire spell has two sound effects. One belongs to the player casting the spell. The other belongs to the surface or enemy the spell hits.

The connection to Wwise lives in a Unity asset called Fire Gem Audio. Each gem has its own asset, so Unity can look up the sound effects for whichever gem the player equips.

Unity Project window with Fire Gem Audio selected alongside the other gems’ audio assets
The Project window shows Fire Gem Audio alongside the equivalent assets for Ice, Thunder, Water and Wind.

Inside Fire Gem Audio, two fields connect the short spell to Wwise. Shot holds the launch event, fire_shot. Impact holds the hit event, fire_impact.

Fire Gem Audio Inspector with Shot and Impact highlighted
The highlighted rows pair each part of the short Fire spell with its Wwise event.

When the player casts. With the Fire gem equipped, pressing the right trigger (RT) on a game controller or the 1 key on a keyboard launches the spell. The casting script tells the audio script which gem the player used (Fire) and how much charge had built up (zero on the initial press). Fire selects the Fire Gem Audio settings. With zero charge, Unity uses the Shot field to trigger fire_shot.

When the spell hits. When the projectile hits a surface, Unity creates a temporary audio emitter at the exact spot it hit. Wwise plays the event assigned to Impact (fire_impact) from that spot. The emitter stays there until the sound finishes, even if the projectile has already disappeared.

Charged Spells

Cast → Loop → Release → Hit. After the initial short shot, holding the controller’s right trigger continues into a charged spell. The cast marks the start of charging. The loop sustains and brightens as charge builds. Releasing a charged spell plays its launch sound, and the hit follows when the projectile reaches a surface.

The four sound effects in Wwise

Under Magic Gems → Fire → Long, each part has its own Random Container with one Sound SFX inside. The events target these containers individually, so the game can end the loop, launch the spell and trigger the hit at different times.

Fire → Long in the Wwise Project Explorer. The four containers are listed alphabetically. The expanded loop contains fire_loop_SFX.
Fire → Long in the Wwise Project Explorer. The four containers are listed alphabetically. The expanded loop contains fire_loop_SFX.

Cast and loop · Starting the charge

Once the trigger has been held for 180 ms, Unity posts Play_Fire_Charge. Its first Play action starts fire_cast immediately. Its second Play action starts fire_magic_loop after a 100 ms delay and fades it in over 30 ms. Both times are measured from the event or action in Wwise: the 100 ms delay starts when the event is posted, and the fade starts when the loop begins. That gives the cast a distinct attack before the sustained sound comes in.

Play_Fire_Charge targets both fire_cast and fire_magic_loop. The selected cast action has zero delay and zero fade time.
Play_Fire_Charge targets both fire_cast and fire_magic_loop. The selected cast action has zero delay and zero fade time.

The loop container repeats fire_loop.wav continuously. Its source is trimmed to about 14.84 seconds. If it reaches the end while the trigger is still held, a separate 30 ms Xfade (amp) transition overlaps the end with the beginning of the next pass to smooth the join.

Fire_Charge · How the loop changes while held

Fire_Charge is a Game Parameter with a minimum of 0, maximum of 100 and default of 0. Unity supplies the current value on the caster’s charge emitter: halfway through the charge it sends 50, and at full charge it sends 100. Wwise uses that one value to read two RTPC curves on the fire_magic_loop container.

Game Parameter Editor. Fire_Charge ranges from 0 to 100 and starts at 0.
Game Parameter Editor. Fire_Charge ranges from 0 to 100 and starts at 0.
RTPC tab on fire_magic_loop. The red curve controls Voice Volume. The blue curve controls Voice LPF. Both read Fire_Charge along the horizontal axis.
RTPC tab on fire_magic_loop. The red curve controls Voice Volume. The blue curve controls Voice LPF. Both read Fire_Charge along the horizontal axis.
Fire_ChargeVoice Volume adjustmentVoice LPF
0 · start−6 dB20
50 · halfway−3 dB8
100 · full0 dB0

The loop gains 6 dB across the charge. At the same time, the low-pass filter gradually opens, letting more high frequencies through. The LPF numbers are Wwise filter amounts. A value of 0 means this curve applies no low-pass filtering. Together, the curves make the same sustained sound grow louder and brighter as the spell approaches full power.

Release · Ending the loop and firing the spell

Stop_Fire_Charge has two Stop actions, one for the cast and one for the loop. Both use an 80 ms fade on the caster’s game object. This lets the player interrupt the charge even while the opening cast is still audible. Cancelling uses this stop event alone. Releasing a charged shot also triggers fire_big_shot, whose Play action launches the release sound effect.

Stop_Fire_Charge targets the cast and loop. The selected action shows the 0.08-second fade.
Stop_Fire_Charge targets the cast and loop. The selected action shows the 0.08-second fade.
Release event. The Play action in fire_big_shot targets the fire_big_shot container.
Release event. The Play action in fire_big_shot targets the fire_big_shot container.

Hit · Playing the charged impact

When the projectile hits, Unity posts fire_big_impact at the point of contact. Its single Play action targets the charged impact container. Keeping this event separate from the release lets the time between the two sounds follow the projectile’s actual travel time.

Hit event. The Play action in fire_big_impact targets the fire_big_impact container.
Hit event. The Play action in fire_big_impact targets the fire_big_impact container.

Unity implementation

How the player controls the charged Fire spell

Two Unity assets connect the controller input to the sound. FireGem sets how long the spell takes to charge. Fire Gem Audio, under Assets → CombatTraining → Resources → Combat, holds the Wwise events and the parameter for Fire.

Holding the trigger starts the charge

The first press of the right trigger (RT) on a game controller fires the short spell. If the player keeps holding it for more than 0.18 seconds, the gem audio script sends the event assigned to Play Charge once. Wwise starts the cast and loop on an emitter attached to the player, so the charging sound follows them.

Fire Gem Audio Inspector showing Play Charge assigned to Play_Fire_Charge and Charge Amount assigned to Fire_Charge
Play Charge starts the sound. Charge Amount identifies the Wwise parameter Unity updates while the trigger stays down.

Hold time drives the Wwise curves

The Fire gem reaches full charge at 1.35 seconds. Unity measures progress between 0.18 and 1.35 seconds and sends it to Fire_Charge on that same emitter each frame. For example, about 0.77 seconds into the hold, the spell is halfway charged. Unity sends 50, and Wwise applies the midpoint of both curves: −3 dB of volume adjustment and a low-pass filter value of 8.

Releasing the trigger and hitting a target

Fire Gem Audio Inspector showing Stop Charge, Big Shot and Big Impact event references
Stop Charge ends the held sound. Big Shot and Big Impact are separate assignments for the charged launch and collision.

On a charged release, Unity sends Stop Charge to the player’s emitter, then plays Big Shot as the spell launches. The charged follow-up becomes available at 20% charge, once the shot cooldown has elapsed. If the player cancels the charge, Unity ends the charging sound without firing that follow-up.

When the projectile hits, its collision code supplies the contact point. The audio code creates a temporary emitter there and plays Big Impact. The emitter stays until the sound finishes, so the impact can ring out after the projectile disappears.

Wwise attenuation

How distance changes the Fire impact

When a spell hits a wall, the impact sound comes from the collision point. Wwise measures the distance from the player to that point and uses two curves to shape what you hear. Volume controls how much level the hit loses. Low-pass filter controls how much of its high-frequency detail remains.

Volume · How far each hit carries

Read the red curves from left to right as the hit moves farther away. A value of 0 dB preserves the original level. At 25 metres, the quick hit is down 8 dB and the charged hit is down 4 dB. Check the horizontal scale on each capture: the quick curve ends at 60 metres, while the charged curve extends to 120 metres.

Quick hit · Fire Impact Distance. Full level through 4 m, −8 dB at 25 m and −20 dB at 50 m.
Quick hit · Fire Impact Distance. Full level through 4 m, −8 dB at 25 m and −20 dB at 50 m.
Charged hit · Fire Big Impact Distance. Full level through 3 m, −4 dB at 25 m and −8 dB at 50 m.
Charged hit · Fire Big Impact Distance. Full level through 3 m, −4 dB at 25 m and −8 dB at 50 m.

Low-pass filter · How the tone changes

The blue curves rise with distance. A higher Wwise filter value softens more of the high end. At 50 metres, the quick impact reaches 18 and the charged impact reaches only 8. As well as losing less volume, the charged hit keeps more of its high-frequency detail at the same distance.

Quick hit · Filtering starts beyond 5 m and reaches 25 at 60 m.
Quick hit · Filtering starts beyond 5 m and reaches 25 at 60 m.
Charged hit · Filtering starts beyond 10 m and reaches 20 at 120 m.
Charged hit · Filtering starts beyond 10 m and reaches 20 at 120 m.

Listen at 2 and 25 metres

Play each row from left to right at the same listening volume. Both impacts are inside their full-volume range at 2 metres. Listen for the larger drop in the quick hit as you switch to its 25-metre capture.

Fire impact2 metres25 metres
Quick
Charged
In-engine captures · Original relative levels preserved.

WORK IN PROGRESS

Current showcase, ongoing development.

The training-room and battle reels are available alongside the Windows v3 demo. This is a work-in-progress personal project focused on elemental magic combat, with ongoing refinement of the sound design and gameplay feedback.

PAOLO BELMAR / SOUND DESIGN

Sound design reel