I’ve posted this Q in the newbee’s forum but got no replies, so I’ll try my luck here instead. I’m making a 2D game, NOT using anything but plain doublebuffer images and plain core Java2d, drawImage(), etc. As timer I use GAGE and rendering at a fixed 60 FPS rate. When doing some profiling, I notice that GAGE uses 100% CPU of the available to the JVM. Of that about 15% is to drawImage() calls, game logics and and other updates is practically zero.
I’m not sure how to interpetrate the profiling result but there seem to me as the rendering has been done in time and that there should be time over for other thing within the current framerate. And without sound the game runs smooth…
Now i wanna add some sound to the game. First i used GAGE sound implementation around Java sound API, but as sound quallity is a factor as important as the graphics in the game i wanna use mp3 sounds. This excludes the GAGE API which doesn’t support dito. I stumbled across FMod and the java wrapper around it from http://topresult.tomato.co.uk/~jerome/Fmod/NativeFmod.
It was as easy to implement as i states, but my implementation of it REALLY slowed the game down, making it impossible to play and therefore accept. Has anyone done such implementation along with GAGE ? Shall the calls to Fmod be running in its own thread ? Please enlight me dudes…
If anyone intends to response but need some pseudo code or snippets just say so… :O)