1

I am making an awesome game using Cocos3D.

Right now i am just trying to improve performance, and i was hoping anyone out here has some good answers.

My main idea improve performance is to put the physics calculations done by Bullet Physics Engine on a separate thread.

I know this means that the physics calculations won't be in sync with the rendering, but that might just be the better option(the alternative being low performance).

Here are some screenshots of my game, so you guys can have an idea of what type of game i am making. Please take a look at the frame rate on the bottom-left of the screenshots.

image_1 image_2 image_3

As you can see, the frame rate is not so impressive with 10 enemies in the scene.
I know putting all the interface controls (joystick,health bars, spell buttons) in a CCSpriteBatchNode will help performance, and i am going to do that later on.

This was tested on an iPhone 4.
I also tested it on Samsung Galaxy s4, and it was about twice as fast.

Anyway, the main question here is... will putting physics on a separate thread improve performance, or at least will it make the rendering smoother, because it's a bit laggy now.

zamfir
  • 161
  • 7
  • 2
    To answer that question you have to try it out. With GCD that's maybe 30 minutes of work for the uninitiated. The quick test would be to stop calling the physics world update method to see how this affects fps. Typically though the limiting factor of iOS devices is rendering, not CPU cycles, so definitely batch draw as much as possible. The labels are bitmap fonts I hope? Because creating/changing ttf labels is really slow. FWIW best looking cocos3d game to date that I know of. – CodeSmile Sep 17 '13 at 07:33
  • 1
    Thanks for the feedback on my game @LearnCocos2D :). The labels that i use now are actually TTF, BUT i am very aware that every time i setString on a TTF it's like creating a whole new label, so i am definitely changing the labels to bitmap. Um i think you are correct about the physics, they don't effect performance too much. I think i might just have to reduce poly count on the POD files as much as possible, because right now each enemy has like 1800 poly count. – zamfir Sep 17 '13 at 08:43
  • 1
    yo that's a lot of polys! Particularly for how much detail one can make out from this camera angle & distance. My best guess is to try getting polycount down to ~200 for most enemies, maybe ~400 for the player and bosses. – CodeSmile Sep 17 '13 at 09:38
  • 1
    LOL indeed there are a few too many polys. I got some other models that are at around 500 polys, so lemme test it with those models. – zamfir Sep 17 '13 at 09:47

0 Answers0