I don't know if I'm being unreasonable or not..but I was under the impression that static bodies were essentially free. I'm doing a tile based game and each tile was a b2Body.
I knew that wasn't a nice approach so after I got things working I optimized it to use only 1 body and n fixtures attached to said body, where n == number of tiles. I have 300k fixtures attached to said body. I changed it so it did this because I figured the performance problems were from it walking the body list, but that does not seem to be the case.
Right now I've got 2 bodies and 300,000 fixtures attached to one body (the other one is a player).
that one tile body is set to static..but it just brings my server's tickrate to its knees...
Memory isn't an issue it's just cpu usage..I can post code if you would like, just wanted to make sure (a) i'm not being unreasonable and (b) i'm not doing something stupid.
I'm going to eventually tie neighboring fixtures together, condensing them..but that's an optimization for later, not something to bring it out from the gutter.
I knew that wasn't a nice approach so after I got things working I optimized it to use only 1 body and n fixtures attached to said body, where n == number of tiles. I have 300k fixtures attached to said body. I changed it so it did this because I figured the performance problems were from it walking the body list, but that does not seem to be the case.
Right now I've got 2 bodies and 300,000 fixtures attached to one body (the other one is a player).
that one tile body is set to static..but it just brings my server's tickrate to its knees...
Memory isn't an issue it's just cpu usage..I can post code if you would like, just wanted to make sure (a) i'm not being unreasonable and (b) i'm not doing something stupid.
I'm going to eventually tie neighboring fixtures together, condensing them..but that's an optimization for later, not something to bring it out from the gutter.