Cocos2dx2.2.2 performance issue on Windows Phone 8

I’m trying to port an android/iOS game to windows phone 8(cocos2dx v 2.2.2). I’m using the exact same code base that I’ve used for android and iOS. The game functions just fine, but I facing some major FPS drop. The game runs 30FPS in android and iOS, but I’m getting roughly about 10~15FPS on wp8. Has this got to do anything with differences in OpenGL and directX?

I ask someone who told me that the cocos2dx wp8 port use the angleproject which has twice memory cost that the project used to be. My project use xaml and heavy CCLabelTTF drawing.

Any help,comments or redirection to useful articles would be appreciated. Thank you.

maybe this pull request can fix my problem. my test device is exactly Lumia 920

I run my game on Windows phone when game state goes heavy more sprites more animations. device show memory warning and game gone a crash :frowning:

kindly suggest me what i do.

i also use compressed texture S3TC for images but it wont work on windows phone it just work on windows win32.

view this link and may help you: https://github.com/MSOpenTech/cocos2d-x/issues/39. Thanks.

I merge the pull request and the it really increase FPS by about 25% in my lumia 920. Thanks for the pr. But some label text is fuzzy. can not see it very clearly, i revert the code it just ok.

i made some test code, when the font size is below 18 both the english and chinese char are dim, and when the font size is above 20 both the char are allright.
in order to display the chinese i load arialuni.ttf font.

Did it ok, when you reverted the pr? Just after the pr?

@chenjc
merge the https://github.com/cocos2d/cocos2d-x/pull/5478 it is wrong, the screenshot is after i merge the pr. when i reverted the code it is allright.

i know when you ancher center the coord may be float, draw one pixel will mix the round color

hi lostplesed,

I am also porting my ios game to windows 8 device.
I did setup up and getting able to run build on simulator but not on device, can you just elaborate the steps of setup you did + steps of creating project and deploying on device.

Thanks
Vinit

here is a tutorial about how to start in wp8: https://github.com/koowolf/cocos-docs/blob/master/manual/framework/native/installation/wp8-on-win8/en.md

Thanks chenjc. I willl follow this article.

I also have some problems with performance issue. FPS down when it runs on Lumia 900 and 920, i think it happen on some devices have adreno 2xx. FPS is so good on Lumia 620 ( Adreno 305). My design resolution is 800x480 ( landscape ). It 's just use c++, don’t use XAML.
Do you have any solution for this problem? Thanks!

Same problem here! On Android, even on the lowest end devices our game runs at 60fps, but on WP8 it runs terribly. On lumia 520 fps is acceptable, around 45-50, but on lumia 920 it runs at 20fps which is unplayable. Is this performance problem caused by Angle converting OpenGL to DirectX or what? CPU is not the problem as CPU usage is less than 20%.

This should be fixed ASAP, as the cocos2d-x on WP8 is almost useless because of this… :frowning:

Hi,
We have also the same problem. On our lumia 520 the game runs perfect with 56-60fps (release mode). But on our lumia 925 the game runs with 35fps also in release mode.

Did anybody have a solution for this problem?

With many thanks, Matthias

i am sorry guys. busy in fixing bugs on the project.and finally it is online.

http://www.windowsphone.com/zh-cn/store/app/新傲视天地/dbae5b13-8c83-4039-8137-6d2a849ab84d

the game still has some memory problem in low memory devices eg. lumia520 :frowning:

It even seems that on lumia 920 cocos2d-x is rendering at 800x480 and upscaling to 1280x768. Still having crappy fps is weird so there must be a internal problem causing it.

I got our game to run at around 50 fps on lumia 920 by reducing fillrate a lot and doing crazy overoptimization. Still plays somewhat laggy… The bright side is that on lumia 520 our game runs silky smooth 60fps now. :slight_smile:

woo, great jobs, can you share some crazy over optimization method? thank you.
@MasterKelli wrote:

It even seems that on lumia 920 cocos2d-x is rendering at 800x480 and upscaling to 1280x768. Still having crappy fps is weird so there must be a internal problem causing it.

I got our game to run at around 50 fps on lumia 920 by reducing fillrate a lot and doing crazy overoptimization. Still plays somewhat laggy… The bright side is that on lumia 520 our game runs silky smooth 60fps now. :slight_smile:

Our optimization is mostly based on reducing draw calls and fillrate to the absolute minimum. We have a custom tilemap system and it has spatial partitioning to reduce triangle count. We only render what is visible on the screen. I made our parallax background dynamic so it analyzes the current tilemap on screen and only draws where necessary. By doing this I was able to reduce fillrate by a huge amount and gaining more fps.