p m Cocos2D XNA performance.
Posts 1
Added by p m about 1 year ago

Hello, i have a question about Cocos2D performance. I port my game to Cocos2D where i use many AI Behaviors but i port all UI scene and little gameplay (only player movement), my FPS slow (40-45 fps) where on my original full code with AI an 60 bots on screen fps equals 50-55 fps. How yours experiences with this engine. Or maybe you have best practices.

RongHong Huang RE: Cocos2D XNA performance.
Posts 171
Added by RongHong Huang about 1 year ago

hi, how do you get FPS now

Jacob Anderson RE: Cocos2D XNA performance.
Posts 178
Location Totally Evil Entertainment - San Diego
Added by Jacob Anderson 11 months ago

40 fps is not slow. The human brain can only process about 33 frames per second. If your frame rate drops below 30 then your players will be able to discern the interframe updates. Above 33 fps your game will perform just fine.

Jacob Anderson RE: Cocos2D XNA performance.
Posts 178
Location Totally Evil Entertainment - San Diego
Added by Jacob Anderson 9 months ago

AFter my last change which put the scheduler updates into the update() pipe, you should see a boost in performance. Did you try that?

Raghu S RE: Cocos2D XNA performance.
Posts 74
Added by Raghu S 9 months ago

Jacob Anderson wrote:

AFter my last change which put the scheduler updates into the update() pipe, you should see a boost in performance. Did you try that?

you are really doing a good job Jacob. The effort you have put into this is much appreciated. I'm kind of new to both XNA and Cocos.

Jacob Anderson RE: Cocos2D XNA performance.
Posts 178
Location Totally Evil Entertainment - San Diego
Added by Jacob Anderson 9 months ago

Thanks Raghu! I am also going to work on some tutorials. There are lots of fun hidden features in cocos2d that make game programming (and some app programming) very easy.

Raghu S RE: Cocos2D XNA performance.
Posts 74
Added by Raghu S 9 months ago

tutorials would be nice.:)
I haven't switched to your version of cocos-xna yet(will do in future), but in previous code in every class there are initialize methods that create the same objects and return them. These things could have been done in a constructor. Am i missing something or is there a reason for doing so.

Raghu S RE: Cocos2D XNA performance.
Posts 74
Added by Raghu S 9 months ago

hi, Jacob in mango update of WP7 it is possible to unlock 60fps by setting TargetElapsedTime to 166667. hope this will be used in your version of cocos with and option to use to 30fps for old WP7 devices.

Jacob Anderson RE: Cocos2D XNA performance.
Posts 178
Location Totally Evil Entertainment - San Diego
Added by Jacob Anderson 9 months ago

you should be able to do this in your game "AppDelegate". If you phone can do 60 fps then setting the game update interval appropriately (to the correct timeout value) should get you the 60 fps.

my test phone is 30 fps. :( sorry ... what phone model are you using to test?

Jacob Anderson RE: Cocos2D XNA performance.
Posts 178
Location Totally Evil Entertainment - San Diego
Added by Jacob Anderson 9 months ago

RE:
but in previous code in every class there are initialize methods that create the same objects and return them. These things could have been done in a constructor. Am i missing something or is there a reason for doing so

the cocos2d-x API uses this pattern for object construction. The philosophy for cocos2d-xna was to copy the same patterns to make porting easier.

if I change the way the API works now, I wonder how much of an impact it will have on the existing projects? Adding yet another construction pattern (even the default OOP style) could be more confusing ..

More tutorials will be helpful.

I will try to accommodate everyone as much as i can, but we also have to make sure that we don't break copmatibility with existing projects....

Raghu S RE: Cocos2D XNA performance.
Posts 74
Added by Raghu S 9 months ago

I'm using a Lumia 710. I have tried 60 fps unlock with Cocos-xna. It works perfectly and animations and particle effects are much more smoother.

Well i agree with you about the coding part. Tutorials will definitely help.


(1-10/10)