irresistible force wrote:
It seemed quite sane until you said 15 layers. I don't think 15 would be a problem, but I am wondering if you know about the possibilities for collision flags of fixtures.
Thanks for pointing this out. The most reasonable implementation for me seems to be a single b2World for the 4 layers that gameplay happens on. The rest of the layers are graphics-only. I burn a nybble on collision checks for the 4 gameplay layers.
I can spawn additional rbWorlds for effects layers that need physical simulation outside of the gameplay world.
irresistible force wrote:
if the worlds have a lot of calculation involved, separating them would be an easy way to get multi-threading for better performance on multi-core CPUs.
This will become important to me in a couple weeks because I have multiple, concurrent game levels simulating on the server. I tried looking around on the net for reports of people running multiple b2Worlds on concurrent threads but I did not see any. Have you witnessed anyone getting this to work?