Worked out of the box with guix openjdk@25 – bash ./chain-reaction.sh
Sometime in between it switched the sound output from the speakers to the headphones.
I didn’t understand the game, but it was pretty fun to try out.
Thanks for trying it out!
The rules of the game and usage instructions are in the README, which is also bundled inside the ZIP file (both the binary ZIP file and the source ZIP file). The section entitled The game gives an overview of the game's mechanics and winning conditions, while the section entitled In game key controls describes the keyboard controls that are used to select different types of bomb.
The game uses the JVM's built-in javax.sound package for the sound effects (specifically the digital audio / "sampled" APIs) for sound generation, and how that interacts with your computer's actual sound hardware is both JVM implementation dependent, and specific to how your OS switches audio output when multiple output devices are present, or the available output devices change (e.g. headphones are plugged in). I've never used that JVM core API before, so don't know too much about the specifics of how that works, but on macOS (my development OS) I observed that it appeared to respect my system settings (i.e. if I switched my system audio output device in the macOS control panel, the game automatically followed that change). Other OSes may behave similarly?
Thank you for the details!
I’m using GNU Linux, and usually that should work. But I have two user accounts, and when one plays sound on some device, the other cannot use it. So if the game releases the audio hardware every time its sound stops, the other account may use the hardware, so the first has to switch to headphones.
(this is only across different user accounts)
Other games usually capture the audio device and then keep it. Could it be that this is different here?