Hi,
I've got a game where at maximum I want 90 dynamic bodies on the screen at once. (all circles)
I've got my screen setup so my display is 20x30 meters. Each circle is 1 meter in diameter.
I can currently get 60 dynamic bodies on the screen until my frame rate drops below 60FPS.
my settings are:-
Which gives the circles a nice feel about them without them feeling to heavy.
How can I squeeze a bit more out of the engine? I've got a feeling when I start building my game loop up, the FPS will suffer below 60 dynamic bodies.
One thing I read was that 1 meter was the "Sweet" spot for Box2d. However the current manual says you should make objects the size they are in the real world. I thought about this and re-sized the world and the dynamic bodies so they had diameter of 0.25. Roughly the size of a Pinball (no I'm not making a pinball game, just a test). However this didn't really have any positive or negative results.
How have other people experienced setting up Box2d on iPhone? and what limits have people hit?
Thanks
I've got a game where at maximum I want 90 dynamic bodies on the screen at once. (all circles)
I've got my screen setup so my display is 20x30 meters. Each circle is 1 meter in diameter.
I can currently get 60 dynamic bodies on the screen until my frame rate drops below 60FPS.
my settings are:-
Code:
Settings() :
hz(30.0f),
velocityIterations(3),
positionIterations(2),
drawStats(0),
drawShapes(1),
drawJoints(1),
drawAABBs(0),
drawPairs(0),
drawContactPoints(0),
drawContactNormals(0),
drawContactForces(0),
drawFrictionForces(0),
drawCOMs(0),
enableWarmStarting(1),
enableContinuous(1),
pause(0),
singleStep(0)
{}
hz(30.0f),
velocityIterations(3),
positionIterations(2),
drawStats(0),
drawShapes(1),
drawJoints(1),
drawAABBs(0),
drawPairs(0),
drawContactPoints(0),
drawContactNormals(0),
drawContactForces(0),
drawFrictionForces(0),
drawCOMs(0),
enableWarmStarting(1),
enableContinuous(1),
pause(0),
singleStep(0)
{}
Which gives the circles a nice feel about them without them feeling to heavy.
How can I squeeze a bit more out of the engine? I've got a feeling when I start building my game loop up, the FPS will suffer below 60 dynamic bodies.
One thing I read was that 1 meter was the "Sweet" spot for Box2d. However the current manual says you should make objects the size they are in the real world. I thought about this and re-sized the world and the dynamic bodies so they had diameter of 0.25. Roughly the size of a Pinball (no I'm not making a pinball game, just a test). However this didn't really have any positive or negative results.
How have other people experienced setting up Box2d on iPhone? and what limits have people hit?
Thanks