[Bug]: audio Controls Lose State After Screen Navigation
👉 Please confirm the following
- [x] I agree to follow the Code of Conduct that this project adheres to.
- [x] I checked the current issues for duplicate bugs.
❌ Current Behavior
The volume up/down input and the mute button on the main screen stop working after navigating to the ship selection screen and returning to the main menu.
✅ Expected Behavior
The volume up/down input and the mute button on the main screen should continue to work normally after navigating to the ship selection screen and returning to the main menu. If the game is muted from the main menu, the mute state should persist across all screens and the game should remain globally silenced. The global audio state (volume level and mute status) should remain consistent throughout the entire app, regardless of screen navigation.
🚩 Steps To Reproduce
🚩 Steps To Reproduce
- Open the game and go to the main menu.
- Use the volume up/down input or press the mute button to adjust/mute the sound.
- Navigate to the ship selection screen.
- Return to the main menu.
- Notice that the volume input and mute button no longer work as expected.
- If the game was muted before navigation, sound may return unexpectedly or controls may become unresponsive.
https://github.com/user-attachments/assets/e1c79d8b-72a4-4f8d-a7d2-e9dbc1349dfc
💻 Environment
- OS:
- Game version: 1.0.0
ℹ️ Additional information
It appears that the audio object is being reinitialized or recreated on each screen, instead of maintaining a single global instance. This could be causing the audio state (volume/mute) to reset or desync when navigating between screens.
👋 Hello @AlexiSkyline, thank you for your interest in Dinosaur Exploder 🦖! Please visit our ⭐️ Discord server if you need help about something.
If this is a 🐛 Bug Report, please provide a minimum reproducible example to help us debug it. If this is a 🆕 feature request, please provide all your ideas, or better yet: a model of what you'd like to improve in the game.
- ✅ Verify that you have well fill out the different checkboxes in the issue template.
Oh yes there is indeed a big problem. We should refactor it and just remove the btn at the right to avoid having two different buttons that do similar things... I don't know but good issue, thanks !
There is a BIG refactor to make on the sound management. If we turn off the sound, the sound should be turned off in the home screen, in the lobby and while playing. Because so far when we turn off the sound, it works only on the home menu, not in the lobby and while playing.
I can solve this problem .
Awesome, good luck ! @SakshamKaundal
What happening here for each page it have its private object newly created, so sound change when we play game , do you think the way to solve problem is to make central audioManager that control everything or there can be a simpler way to fix this ?
I have put up a PR please review it
The issue is still active. @SakshamKaundal did a first part, there is still some work to do :)
Hello, may I help with what's left of the issue?, idk if it's on progress rn or something is missing?
Hello @santiagoOrozco-encora yep you can work on this issue. You can see the TODOs left : https://github.com/jvondermarck/dinosaur-exploder/pull/207#pullrequestreview-2844419227 from the last PR of the contributor who work on the issue.
Hi , yes there are issues i have made a centralized audio the remain things are to integrate it with every screen it have some bugs that audio loss please test the game and switch to screens game have too much sound and ship selection have non
On Thu, 10 Jul 2025 at 04:09, santiagoOrozco-encora < @.***> wrote:
santiagoOrozco-encora left a comment (jvondermarck/dinosaur-exploder#146) https://github.com/jvondermarck/dinosaur-exploder/issues/146#issuecomment-3054315230
Hello, may I help with what's left of the issue?, idk if it's on progress rn or something is missing?
— Reply to this email directly, view it on GitHub https://github.com/jvondermarck/dinosaur-exploder/issues/146#issuecomment-3054315230, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAXKF45F42INN7R7KN2CXWL3HWK3XAVCNFSM6AAAAAB3ERXEG2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTANJUGMYTKMRTGA . You are receiving this because you were mentioned.Message ID: @.***>
Hello, sorry for the delay, I integrated the manager with the main menu so we use only one audio manager, also I added the missing function to avoid the audio loose between the screens and I use the settings audio on the launch so it rememeber the audio volume for the next time the game is started, andy feedback or missing thing Im here :D
The issue is still open and the bug is still active...
Hello! I noticed that the sound setting is not loaded on the next game startup (after muting and exiting the game, the sound is still on upon the next startup with the icon in the first screen showing the wrong status). Can I help in solvig this?
Hiii, yes you can definitely help with this, no problem at all !! Good luck @ftaramo Thanks so much for your contribution and sorry for the late answer !
Hi , I want to apologise to leave this task on the way. i want to continue contributing to this project can you tell me what me to be done here
On 30 Oct 2025, at 12:59 AM, Julien Von Der Marck @.***> wrote:
jvondermarck left a comment (jvondermarck/dinosaur-exploder#146) https://github.com/jvondermarck/dinosaur-exploder/issues/146#issuecomment-3463487255 Hiii, yes you can definitely help with this, no problem at all !! Good luck @ftaramo https://github.com/ftaramo Thanks so much for your contribution and sorry for the late answer !
— Reply to this email directly, view it on GitHub https://github.com/jvondermarck/dinosaur-exploder/issues/146#issuecomment-3463487255, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAXKF47ZNC472G262J3H72332EIQRAVCNFSM6AAAAAB3ERXEG2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTINRTGQ4DOMRVGU. You are receiving this because you were mentioned.
Hello @SakshamKaundal have a look on the last comments of this PR, there are still some sounds issues in the game let's resolve them.
You can see the TODOs left : https://github.com/jvondermarck/dinosaur-exploder/pull/207#pullrequestreview-2844419227 from the last PR of the contributor who work on the issue.
from what i can see when we go to ship selection audio is good ,but if we go back audio is gone. except everything is fine right ?
Yes it is mainly if we go back, we lose the audio and also, if we navigate screen by screen, the song seems to START again from scratch, so like if we init the audio all over again, so it's weird, we should have one instance only @SakshamKaundal