how to prevent fps drop

i have ported a game on blackberry playbook.
the problem is when i start the gameplay the fps drops by a tremendous amount and coz of which the game becomes laggy.

can anyone suggest me what to do so that the frame rate does not go below 30 fps.

pls help me into this…

thank you in advance.

  1. use TexturePacker or Zwoptex to merge your images into larger texture atlas. In this way the game can decrease the times of file io
  2. merge images which are in a same scene into one texture atlas, so you can use CCSpriteBatchNode to optimize the speed.
  3. reduce the amount of full-screen sprites, also reduce actions on them.

Walzer Wang wrote:

# use TexturePacker or Zwoptex to merge your images into larger texture atlas. In this way the game can decrease the times of file io
# merge images which are in a same scene into one texture atlas, so you can use CCSpriteBatchNode to optimize the speed.
# reduce the amount of full-screen sprites, also reduce actions on them.

hey thanks for your reply.
i am using the texture packer images only as mentioned by you.
the problem is that the moment when my update function is called the fps starts dropping and again when the particular stage is over i get sufficient fps.
in my update function i keep the track of many things and also many functions are called that time.

what shall i do for this.
any other methods to optimize it.

So you need to optimize your update function, e.g.
# add the 2nd param of node->schedule(callback, interval) if you can slow down the callback frequency, don’t callback on each frame
# optimize the math calculation in your update, but it depends on your logic

Walzer Wang wrote:

So you need to optimize your update function, e.g.
# add the 2nd param of node->schedule(callback, interval) if you can slow down the callback frequency, don’t callback on each frame
# optimize the math calculation in your update, but it depends on your logic

Finally i found the reason why my fps was dropping……………
i had used CCLABELTTF in my update function and the fps is dropping coz of that only.

do you have any solution for it.

i heard about CCLABELATLAS but dont know how to use it.

pls guide me to the optimised solution for it……

thanks a lot………………………………….

Well, a “famous” problem. On Android, we used CCLabelBMFont instead of CCLabelTTF to optimize the performance.
I have no experience on blackberry platform, but I think it also works.