-
oronbzLikes 1Problem Description
Hi,
I'm new to Cocos2d-X,
I'm really confused whether to go with Cocos2d-X or Cocos2d-JS for cross platform mobile games.
Do you think Cocos2d-JS is matching the performance and stability of Cocos2d-X, is it mature enough to count on? do you think it'll still be maintained parallel to Cocos2d-X?
-
Sonar Systems adminLikes 0
Very good question, it has now been pinned.
Cocos2d-x and Cocos2d-JS performance is pretty much on par so you don’t need to worry about that. First biggest thing is what language do you know and are comfortable with (C++ or JavaScript). Both of the have longevity but Cocos2d-JS has more longevity as it is JavaScript based and JavaScript is becoming more and more popular. Also Cocos2d-JS allows you to develop for the web, but on the flip side, Cocos2d-JS has nowhere near the same number of resources and this won’t change in the next year or so most likely so a lot of it will be down to you learning it from scratch.
Hope this helped.
-
efaresLikes 1
I was in the same situation as you a few months ago. I was trying to decide where to start. My background is web development and so I was very comfortable with JavaScript. Therefore I started working with Cocos2d-JS and I’m happy with that choice. I’m well along making my first Cocos mobile game.
I felt like there is enough resources between these 3:
This reply has been verified.
-
cloudmobileLikes 0
Hi, I new to cocos2d-x , I would like to know how to spawn a player (objects) in Tile Map(isometric z-order). I have found some tutorial online https://www.raywenderlich.com/39113/cocos2d-x-tile-map-tutorial-part-1, the codes are very deprecated.
Any help is appreciated.
Thanks in advance
auto map = TMXTiledMap::create("TileGameResources/iso4.tmx");
//map->setPosition(Point((visibleSize.width) + origin.x, (visibleSize.height) + origin.y));
map->setPosition(Vec2()+origin);
float rX1 = visibleSize.width / map->getContentSize().width;
float rY1 = visibleSize.height / map->getContentSize().height;
map->setScaleX(rX1);
map->setScaleY(rY1);
this->addChild(map, 1, 99); // with a tag of '99'
TMXObjectGroup *objectGroup = map->objectGroupNamed("Objects");
if(objectGroup == NULL){
CCLog("tile map has no objects object layer");
return false;
}
map *spawnPoint = objectGroup->objectNamed("SpawnPoint");
int x = ((CCString)*spawnPoint->valueForKey("x")).intValue();
int y = ((CCString)*spawnPoint->valueForKey("y")).intValue();
_player = new Sprite();
_player->initWithFile("Player.png");
_player->setPosition(ccp(x,y));
this->addChild(_player);
Login to reply