dinosaur-exploder icon indicating copy to clipboard operation
dinosaur-exploder copied to clipboard

[Feature]: Manage sounds on the game and control the volume

Open jvondermarck opened this issue 2 years ago • 16 comments

👉 Please confirm the following

🤔 Is your proposal related to a problem?

No response

😍 Describe the solution you'd like

It would be great to have a button on the home screen to put the sound of the game on or off. image

👍️ Describe alternatives you've considered

It would be great maybe to have a gauge, to increase or decrease the intensity of the sound?

✍ Additional context

No response

jvondermarck avatar Jul 10 '22 14:07 jvondermarck

Hello! May I work on this issue? I already have an idea on how to work this out.

RamonASV avatar Jul 11 '22 01:07 RamonASV

Hi @RamonASV yeah of course, go ahead :)

jvondermarck avatar Jul 11 '22 05:07 jvondermarck

I'm currently having some troubles on this, as DinosaurController.java uses FXGL.play() instead of a MediaPlayer. As of now I can only mute the music in the main menu. I also noticed that when you lose and return to the Main Menu the gameBackground.wav file keeps playing instead of the mainMenu.wav

RamonASV avatar Jul 11 '22 23:07 RamonASV

For the first issue, maybe you can create a boolean variable for the music to know if the game has to put the home screen sound and the game sounds while playing, try to do that maybe?

if (game.isMusicOn){ play.music(engine.wav;}

(the code is false but it's just an example)

jvondermarck avatar Jul 12 '22 04:07 jvondermarck

and for the second issue indeed something is going wrong.. that's weird.. Maybe there is a method from FXGL to stop all sounds activated and then you can activate the home screen sound again when u go back to the menu?

jvondermarck avatar Jul 12 '22 04:07 jvondermarck

@RamonASV can I help you out with it ?

Vishrut19 avatar Sep 03 '22 05:09 Vishrut19

Hi @Vishrut19 you can finish this issue alone, I am not sure he's still working on it, so go ahead :)

jvondermarck avatar Sep 03 '22 09:09 jvondermarck

Hi @Vishrut19 you can finish this issue alone, I am not sure he's still working on it, so go ahead :)

Okay I will try to do whatever I can.

Vishrut19 avatar Sep 03 '22 09:09 Vishrut19

Hey, is this issue closed? , If not i would like to work on it.

YesShubham01 avatar Dec 06 '22 12:12 YesShubham01

@YesShubham01 Heyy, you still can work on it :)

jvondermarck avatar Dec 06 '22 20:12 jvondermarck

Hey, is the issue solved? If not, can you assign it to me?

Anshul439 avatar May 01 '23 19:05 Anshul439

Hi @Anshul439 this issue is all yours ! You can work on it !

jvondermarck avatar May 01 '23 21:05 jvondermarck

Hey! I have made a PR. Please check it out and let me know if the problem is solved.

Anshul439 avatar May 04 '23 10:05 Anshul439

Now it would be better to also control the volume.

jvondermarck avatar Apr 18 '24 19:04 jvondermarck

Hi, can I work on this issue?

alemarin5 avatar Aug 06 '24 22:08 alemarin5

Hi, can I work on this issue?

Heyy, @alemarin5 absolutely you can work on it !

jvondermarck avatar Aug 07 '24 05:08 jvondermarck