Ricardo Quesada wrote:
Piotr:
>
Were you able to use 600x600 map on cocos2d-x v2 ?
If so, I would be surprised. But if there are maps that you can render on v2, but you cannot render on v3, then it is a bug and we are going to fix it.
>
Please, let me know if that is the case. thanks.
Sorry, my mistake. Now I see, I have previous, 3.0 version in mind.
At this time I have tested both 3.0: alpha0 and alpha1. They can handle 3-layered TMX maps with size over 1000x1000 32px tiles without problems on desktop (intel graphics 4000) with 60fps scroll animation. Unless I’m doing something wrong, but I see nice fast scroll, so I think it is real
But to exclude probability of any TMXTiledMap bugs, I have also created simple direct test for batch node:
void MainScene::testBatchNode()
{
SpriteBatchNode *batchNode = SpriteBatchNode::create("ground.png", 20000);
for (int y = 0; y < (10 * 100); y++)
{
Rect rectTile = Rect::Rect(y % 8 * 32, y % 3 * 32, 32, 32);
for (int x = 0; x < 100; x++)
{
Sprite *player = Sprite::createWithTexture(batchNode->getTexture(), rectTile);
Point playerPos(x * 32, y * 32);
Point anchor(0,0);
player->setAnchorPoint(anchor);
player->setPosition(playerPos);
player->setTexture(batchNode->getTexture());
player->setOpacity(80);
batchNode->addChild(player);
}
}
this->addChild(batchNode);
}
This handles 100k sprites with 60fps.
Unfortunately all of these tests fail on 3.0 beta. I don’t know how renderer works, I only know, that alpha version can handle everything, and beta can’t I hope it is fixable, because there is no such another great framework like cocos2d-x (except native Apple SpriteKit of course)
If you need some tests or sth, I will be happy to help.