2
\$\begingroup\$

I'm trying to play music in the background for my opening menu, but cant seem to find a tutorial specifically on how to play a music file. Does anyone know how this can be accomplished?

\$\endgroup\$
2
\$\begingroup\$
@Override
public void init(GameContainer gc) throws SlickException {
    Music openingMenuMusic = new Music("res/openingMenuMusic.ogg");

    openingMenuMusic.loop();
}

http://slick.cokeandcode.com/javadoc/org/newdawn/slick/Music.html

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.