我目前正在测试 Slick2D,这就是我编写 Pong 游戏的原因,此外,在这个 PongGame 中,您可以选择 ./music 文件夹中的音乐文件
当我通过 Eclipse 运行它时,一切正常。当我导出它时,使用文件夹中的所有本机和库运行它,它也会启动,但音乐菜单不起作用(当我选择音乐时它会崩溃)
您可以在以下位置看到代码: https ://bitbucket.org/JohnnyCrazy/pingpong/src/f2fd635ccfef/src/me/Johnny/Slick2D?at=master
Error: Mon Feb 04 13:47:05 CET 2013 ERROR:OpenAL error: Invalid
Operation (40964) org.lwjgl.openal.OpenALException: OpenAL error:
Invalid Operation (40964)
at org.lwjgl.openal.Util.checkALError(Util.java:64)
at org.lwjgl.openal.AL10.alDeleteBuffers(AL10.java:1097)
at org.newdawn.slick.openal.AudioImpl.release(AudioImpl.java:56)
at org.newdawn.slick.Music.release(Music.java:424)
at me.Johnny.Slick2D.Slick2D.setMusic(Slick2D.java:57)
at me.Johnny.Slick2D.MusikState.update(MusikState.java:108)
at org.newdawn.slick.state.StateBasedGame.update(StateBasedGame.java:278)
at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:678)
at org.newdawn.slick.AppGameContainer.gameLoop(AppGameContainer.java:456)
at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:361)
at me.Johnny.Slick2D.Slick2D.main(Slick2D.java:40) Mon Feb 04 13:47:05 CET 2013 ERROR:Game.update() failure - check the game code.
org.newdawn.slick.SlickException: Game.update() failure - check the
game code.
at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:684)
at org.newdawn.slick.AppGameContainer.gameLoop(AppGameContainer.java:456)
at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:361)
at me.Johnny.Slick2D.Slick2D.main(Slick2D.java:40)
我不明白为什么它在 Eclipse 中工作并且导出它没有。