Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 tasks done
jvondermarck opened this issue Jul 10, 2022 · 16 comments
Closed
2 tasks done

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

jvondermarck opened this issue Jul 10, 2022 · 16 comments
Assignees
Labels
difficulty:medium Need time to think through good first issue Good for newcomers

Comments

@jvondermarck
Copy link
Collaborator

👉 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 jvondermarck added good first issue Good for newcomers difficulty:medium Need time to think through labels Jul 10, 2022
@RamonASV
Copy link

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

@jvondermarck
Copy link
Collaborator Author

Hi @RamonASV yeah of course, go ahead :)

@RamonASV
Copy link

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

@jvondermarck
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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?

@Vishrut19
Copy link

@RamonASV can I help you out with it ?

@jvondermarck
Copy link
Collaborator Author

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

@Vishrut19
Copy link

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.

@YesShubham01
Copy link

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

@jvondermarck
Copy link
Collaborator Author

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

@Anshul439
Copy link

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

@jvondermarck
Copy link
Collaborator Author

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

@Anshul439
Copy link

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

@jvondermarck jvondermarck changed the title [Feature]: Manage sounds on the game [Feature]: Manage sounds on the game and control the volume Apr 18, 2024
@jvondermarck
Copy link
Collaborator Author

Now it would be better to also control the volume.

@alemarin5
Copy link
Contributor

Hi, can I work on this issue?

@jvondermarck
Copy link
Collaborator Author

Hi, can I work on this issue?

Heyy, @alemarin5 absolutely you can work on it !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty:medium Need time to think through good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

6 participants