Hi,
In my side-scroller game, I am using about >100 static edgeshapes to create the terrain, and only 20-30 dynamic bodies (box). And now it's running slow, the average FPS is 15-20. I've turn off any suspicious routine and only run the box2d simulation, but it's still slow.
When I reduce the dynamic bodies into 3-5, the speed run well at 30FPS.
Anyone can explain how this happened? Is there anything I can improve or change from box2d settings and my code?. I am using the latest Box2D.
Thanks.
In my side-scroller game, I am using about >100 static edgeshapes to create the terrain, and only 20-30 dynamic bodies (box). And now it's running slow, the average FPS is 15-20. I've turn off any suspicious routine and only run the box2d simulation, but it's still slow.
When I reduce the dynamic bodies into 3-5, the speed run well at 30FPS.
Anyone can explain how this happened? Is there anything I can improve or change from box2d settings and my code?. I am using the latest Box2D.
Thanks.