Skip to content

Module 1: sounds that work, plus ambience, frogs, dragonflies and feedback - #59

Merged
RomeXO10 merged 5 commits into
mainfrom
module-1-audio
Oct 12, 2026
Merged

RomeXO10 merged 5 commits into
mainfrom
module-1-audio

Conversation

@RomeXO10

@RomeXO10 RomeXO10 commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

Fixes (sounds that were missing or wrong)

  • Cars were often silent. StereoSoundListener switched every sound off beyond 20 m, which restarted the car clip each time you came back and left it silent once it had played through. It now only lowers the volume with distance.
  • Left and right were swapped for the cars. Fixed.
  • The second car had no sound at all (its clip was never committed). It now uses the same engine sound as the first.
  • The rain was far too loud. It was about 25 dB louder than everything else and drowned out the rest for the middle third of the game. It now plays at 0.15, fades in and out instead of cutting, and the village ambience gets quieter while it rains.

New sounds (all CC0 from Freesound, listed in Team Assets/Sound/Module1/CREDITS.md)

  • Village ambience: a rural Thai village with birds.
  • Frogs croak now and then, so you can hear where they are.
  • Dragonflies hum, and get louder and faster when one is chasing you.
  • Feedback: sipping nectar, drinking blood, a pop when the blood bar is full, a sparkle when mating, a plop for each egg, a heartbeat while in danger, and a splat plus a short sting when you die (only the sting when you starve).

Also in this PR: laying all four eggs wins the game

Carried over from #56, the only part of it that is not already on main.

  • Before, laying the fourth egg only turned the last quest green, and the player flew around until the timer ran out.
  • Now the game ends there. The timer stops, the player stops moving, and the score card appears with a green title, ພາລະກິດສຳເລັດ! ("mission complete"). As after a time-out, pressing a button goes back to the start menu.
  • Tested in the editor: four egg presses, the card appears, the timer stops, the player can't move, and the next press opens the start menu.
  • Please check: is the Lao title right? I wrote it myself, using ພາລະກິດ from the quest card. And should a win really end the game?

Also in this PR: a start-menu error fixed

The start menu (Startup Menu_New) showed an error every time it opened: at launch, and after a time-out or a win. The IP text, the middleware switch and the player id are hidden in that menu, and MenuController expected them to be there, so it stopped before saving the default connection settings. It now works without them. Menus that still show them behave as before.

How it is built

  • Module1Sounds is added by GameManager from code (like Module1HUD), so Main Scene barely changes. The only scene edits are switching the wing buzz on and giving the second car its clip.
  • Every clip and volume is in one asset, Resources/Module1/Module1SoundBank. Change volumes there in the Inspector.
  • Frogs and dragonflies are 3D sounds that fade out at 20 m, like the cars.
  • The team's scripts are untouched apart from one line in GameManager.Awake and the fix in StereoSoundListener.

What was tested

  • In the editor, a bot played through and the actual audio output was recorded and measured. Every sound plays at its moment, and the levels are balanced:
    • wing buzz and ambience: about −45 dB;
    • rain: −37 to −41 dB;
    • car or frog up close: around −30 dB;
    • feedback sounds: around −30 dB.
  • Car left/right matched the car's side in 45 of 48 passes.
  • No performance cost: frame time is the same with and without the new sounds.
  • Not yet tested on a headset, and nobody has listened carefully yet. The clips were picked from Freesound descriptions and measured, not judged by ear.

Please test on the Quest

  1. Do the new sounds fit the game? Is any of them annoying or wrong for a Lao village?
  2. Can you still hear the cars and frogs while it rains?
  3. Is the dragonfly hum a useful warning?
  4. To change a volume: Resources/Module1/Module1SoundBank → Inspector.

Known issue (not caused by this PR)

Most male mosquitoes sit inside a flower patch. When you approach one, the game often targets the flower instead of the male, so mating can be hard. Please check this on the headset.

…way round

StereoSoundListener switched every AudioSource in the scene off beyond 20 m. That restarted the
one-shot car clip on every return, left it silent once it had played through, and fought
MovingCar's own on/off between passes. It now only sets volume by distance, leaves the player's
own sounds alone, keeps each source's authored volume as its maximum, and no longer swaps left
and right (panStereo was negated).

The second car had no clip (the prefab points at a file that was never committed), so it gets
the same engine sound as the first. The wing buzz is switched on in the scene, since the listener
no longer does that. The three clips now preload; the long rain loop streams.
…uieter rain

Module1Sounds is added by GameManager like Module1HUD, so the scene does not change. Clips and
volumes are in Resources/Module1/Module1SoundBank:
- a Thai rural village ambience bed that quietens while it rains;
- the rain, taken over from the scene so it fades in and out at 0.15 instead of cutting in at
  full volume (it was about 25 dB louder than everything else);
- frogs croak in short bouts and dragonflies drone, as 3D sounds that fade out at 20 m like the
  cars; a dragonfly gets louder and faster while it chases the player;
- sipping nectar, drinking blood, blood bar full, mating, laying an egg, a heartbeat while in
  danger, and a splat plus sting on death (sting only when starving).

All clips are CC0 from Freesound, listed in Team Assets/Sound/Module1/CREDITS.md;
Module1AudioImport keeps their import settings.
# Conflicts:
#	Assets/1.TeamWorkspace/Module1/GameSystem/StereoSoundListener.cs
Laying all four eggs used to change nothing: the last quest turned green
and the player flew around until the five-minute timer ran out. Now
QuestSystem calls GameManager.Victory when the egg quest latches. It stops
the timer, freezes the player (PlayerMain.Playing) and shows the time-out
score card. Module1HUD gives that card a green title, "ພາລະກິດສຳເລັດ!"
(mission complete, built on the quest card's own word ພາລະກິດ). As after a
time-out, the next button press goes back to Startup Menu_New instead of
starting a new life.

From PR #56 (module-1-improvements), the only part of it that the
Module 1 integration (#58) did not carry over. Rewritten for the team's
GameManager, which has no end-reason enum or win screen.

Checked in the editor with a batchmode bot: four Space presses in a filled
container -> eggs 4, Won true, Playing false, card shown with the win
title, timer frozen at 297, no movement on W, and the next press loads
Startup Menu_New.
Module 1's Startup Menu_New has the IP text, the middleware toggle and the
player id switched off. FindGameObjectWithTag skips inactive objects, so
MenuController.Start threw a NullReferenceException (line 19) every time
the menu loaded: on launch, and after a time-out or a win. It stopped
before setting the IP and middleware defaults in PlayerPrefs, and the
connection fell back to WebSocketConnector's DefaultIP.

Each widget is now optional; the PlayerPrefs defaults are always set.
Scenes that show the widgets behave as before.

Checked by re-running the win playtest through to the menu: no exception.
@RomeXO10
RomeXO10 merged commit 46a2399 into main Oct 12, 2026
1 check passed
@RomeXO10
RomeXO10 deleted the module-1-audio branch October 12, 2026 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant