Version 3.1 low FPS

Hello,
we ported our game to wp8, we used version 2.3 until now. Since we had serious problems on wp (920 very slow, generally memory problems on 512 MB devices), I converted the project to version 3.1.

  1. I read somewhere on this forum that version 3.1 uses DX natively without ANGLE project but I see now that ANGLE is still in the project. So how is it with ANGLE on the newest version and what is the plan to the future?

  2. I did not managed run tests on wp8, I see only black screen with memory and FPS stats. I did not find the problem, the menu with tests is created normally.

  3. Poor FPS on all devices - I tried 520 and 920. The performance is very similar on these devices now and very poor (GL Verts 500 = 30FPS). [compiled in release without debugger]. Do you have any suggestions what can be wrong? Since the game runs on iPhone 4 without any problems (60FPS) - (and iPhone 4 is really bad device).

Thanks for reply.

Jiri

No. It doesn’t use DX directly.

We have some work to do before we can use DX directly.

Ok, thank you for answer. Finally I run tests which seem ok on these devices.

Ok, I tested performance on iOS and WP. It seems that WP devices have half FPS as comparable iOS device. XNA cocos is much faster.

Yep, it is because we don’t use DX directly.
So it is a problem on WP8 now.

Understood. Can I ask you about the progress? It is several months since I saw the information about direct support of DX :slight_smile:
Thanks.

To be honest, it is not in plan now.
We will discuss the priority when releasing v3.2.

@zhangxm
您好,能帮助我一下吗?透明区域判断的
int8_t data[4];
Point touchPoint = bgSprite->convertTouchToNodeSpace(touch);
//Point touchPoint = bgSprite->convertToNodeSpace§;
Point location = Point((touchPoint.x) * CC_CONTENT_SCALE_FACTOR(), (touchPoint.y) * CC_CONTENT_SCALE_FACTOR());
RenderTexture* renderTexture = RenderTexture::create(1 * CC_CONTENT_SCALE_FACTOR(),1 * CC_CONTENT_SCALE_FACTOR(), Texture2D::PixelFormat::RGBA8888);
//RenderTexture* renderTexture = RenderTexture::create(640, 1136, Texture2D::PixelFormat::RGBA8888);
renderTexture->beginWithClear(0,0,0,0);//只保存渲染一个像素的数据
//renderTexture->begin();
Point oldPos = bgSprite->getPosition();
Point oldAnchor = bgSprite->getAnchorPoint();
bgSprite->setAnchorPoint(Point(0, 0));
bgSprite->setPosition(Point(-location.x, -location.y));
//renderTexture->begin();
bgSprite->visit();
bgSprite->setAnchorPoint(oldAnchor);
bgSprite->setPosition(oldPos);
glReadPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, data);
renderTexture->end();
//renderTexture->release();
//检测alpha值
log(“X:%.0f y:%.0f R: %d, G: %d, B: %d, A: %d tag:%d”,location.x ,location.y, data[0], data[1], data[2], data[3], this->getTag());
if(data[0] || data[1] || data[2] || data[3])
{
log(“fei tou ming”);
}else{
log(“sssssss”);
}
为什么cocos2dx上不起作用,好像visit()没写进去

@tesla123
I think you should refer to this pull request.

If cocos2d-x use directly directx, that is wonderful

@zhangxm
您好,我是在win32下跑的,没在IOS 上

Hi @tesla123
First please use English in this forum. Then you can get more help in this forum.

I think the problem is that, now RenderTexture just send commands to render queue, it will take effect when these commands are executed. So the better way is that you use glReadPixel() in next frame.

Ok, I have optimized our game mainly by reducing draw calls - currently I have 4! (since we have 4 textures). And I’ve got beatiful 60FPS (original FPS value was about 10FPS!!!). It seems that cocos on WP8 don’t like many draw calls. Each added draw call leads to brutal performance decrease, so it is recommendation for you how it optimize your game. It is pretty easy because of dynamic batching - this is really cool feature!

But after upgrade to the last version of cocos 3.2 the FPS is down again!!! :frowning: I have to go throught changes and find out what is wrong in that revision…

Exactly the same problem on W8 :confused: I hope that native support of DX will be available soon. The Angle solution is not usable for production.

Do you plan W8 support on version 3.1? Thanks.

Hi Swap,
Recently i upgraded to cocos2dx 3.2 , problem is fps has been reduced to 30 on wp8 devices. before i am using cocos2dx 2.2.3 and fps is 55 .Have u find any solution regarding this. If u got Please Share
thanks in advance

Regards
Santosh

Hi Zhangxm,

I Have upgraded my game to cocos2dx 2.2.3 to cocos2dx 3.2 , Fps has reduced to 30 in windows 720p, I am not having any problem if i am using cocos2dx 2.2.3 (Fps is 60). can u tell what exactly is problem.

Thanks in advance

Regards
Santosh

Look here: W8&WP8 D3D renderer