Jme Thread

Hi all,

Ive been trying to get physics to be multi-threaded and it seems to work fine. However, it only works with FixedFramerateGame. This is because the jme loop is hogging up all the thread-resources, so I was wondering if its possible to add a Thread.yield() in the loop so as my physics thread can get a bite at the cpu at regular intervals. Ive done some rough tests and it seems that there is no FPS decrease, in fact, if there is anything, theres an increase and the FPS is more steady and doesn't fluctuate as much on my machine anyway.



The class changes are: BaseGame, VariableTimestepGame, FixedFramerateGame and FixedLogicrateGame. All thats needed is a Thread.yield() in thereā€¦



Regards,

DP

Seems perfectly reasonable. I'll play with it a bit to make sure nothing unexpected happens.

Thanks mojo

in