Repository navigation
Module 1: sounds that work, plus ambience, frogs, dragonflies and feedback - #59
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Fixes (sounds that were missing or wrong)
StereoSoundListenerswitched 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.New sounds (all CC0 from Freesound, listed in
Team Assets/Sound/Module1/CREDITS.md)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.
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, andMenuControllerexpected 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
Module1Soundsis added byGameManagerfrom code (likeModule1HUD), soMain Scenebarely changes. The only scene edits are switching the wing buzz on and giving the second car its clip.Resources/Module1/Module1SoundBank. Change volumes there in the Inspector.GameManager.Awakeand the fix inStereoSoundListener.What was tested
Please test on the Quest
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.