Task #94
Updated by Kenneth Schuetz 3 months ago
## User Story As a **player**, I want **pick Intent: Allow the end users to change the settings for music and SFX volume Note on implementation: The easiest way to implement this is through setting up mixer groups and then routing the various audio sources in the game through the right mixer group (https://docs.unity3d.com/Manual/AudioMixer.html). Here are a couple a quick example of how this can be implemented https://youtu.be/MmWLK9sN3s8 https://johnleonardfrench.com/the-right-way-to-make-a-volume-slider-in-unity-using-logarithmic-conversion/ An issue from mixer groups though is that they take volume in Db rather than a scaler 0 to 1 so it has to be converted. To roughly convert from a scaler value of 0-1 into logarithmic value for the unity mixer group is to use items**, so that I can **restore health**, **gain buffs**, **or solve puzzles**. ## Description - Players can collect items like **potions, keys, "Mathf.Log10(volume) * 20" Note on estimation: Creating the menu doesn't take long. the difficulty and spells scrolls**. time involved on this one is in getting the mixer groups integrated in all of the audio sources in the game * [ ] **Dependencies** * [ ] Menus * [ ] Game objects (to play sounds) - Heal potions retore **HP**, while mana potions retore **mana**. - Some items grant **temporary buffs** (e.g. increased spell damage, faster mana regen. - **Key items** unlock doors, activate objects, or advance puzzles. ## Test * [ ] **Test Cases / Acceptance Criteria** * [ ] Verify that players can pick up items from [ ] Does the environment. game contain an options menu? * [ ] Ensure that using a **health potion restores HP** correctly. Does the games options menu have an option to change the music volume? * [ ] Validate that using When changing the volume of music is there a **mana potion restores mana** correctly. preview of the audio level (preview audio played with the audio system)? * [ ] Confirm that **buff items apply their effects** for Does all of the correct duration. music in the game use the volume defined from the music volume setting * [ ] Ensure that **key items can used Does the games options menu have an option to progress (eg.g unlocking doors)**. change the sound effect volume? * [ ] Check that **items disappear When changing the volume of sound effects is there a preview of the audio level (preview audio played with the audio system)? * [ ] Do all of the sound effects in the game use the volume defined from inventory** the sound effect volume setting * [ ] Does the options menu save the user’s configuration when consumed. the user exits the menu? * [ ] Verify that players **cannot pick up more Does the game automatically load in the saved options when starting up? * [ ] When a volume setting is set at half is the volume audibly at half volume (unity can default to logarithmic scale rather than the inventory limit (if applicable)**. percentage)?