The Somewhat Possible Game by Kristoffer Pauly

Hello Dear Processors, I found an awesome game I want to learn from https://www.dropbox.com/s/6yvuv1i84u41j0m/The_Somewhat_Possible_Game.zip?dl=0 but it is throwing an ArrayIndexOutOfBoundsException: 3 error and highlights line 51 where it says:
backgroundMusic = new SoundFile(this, "Dance of the Pixies.mp3");
on an array that has 300 iterations and it is declared to have 300 iterations.

  • You need to download the Sound library if it is not in your processing library already.

Thank you!

1 Like

It is an obvious question: Did you install the sound library?

Notice that is not common to share files using dropbox. It is preferred to use github.

In that line, the reason that you get that error is either because you dont have the library or possibly, because you do not have the mp3 file. However, your error description seems to point to the culprit.

You can check you have the sound library installed by running any of the provided examples that comes with the PDE.

Kf

1 Like

same here ( win7 / processing 3.4 / sound lib installed )
the /data/Dance of the Pixies.mp3 file is good but crash the sound lib
i copy over /data/vibraphon.aiff from example SimplePlayback
and change to
backgroundMusic = new SoundFile(this, “vibraphon.aiff”);
now it works. ( not forget to click on the game window )

2 Likes

Yes, changing the music file format mp3 to aiff fixes the issue. Thank you very much!

1 Like