I just started with Cocos2D-x after some years using Cocos2d-iPhone/swift/spritebuilder.
What I notice is that the coordinate system in X seems not to use the POINT system common since iOS development. Ie a box of 10x10 points used to be 10x10 pixels on 1x devices, 20x20 pixels on 2x devices and so on.
So my question is, does cocos2d-x only deal with pixels? How do we address this in code - because we used to be able to put a sprite at say 50x20 and it would end up in the right spot on any device regardless of resolution. Not possible in cocos2d-x? I have 3.5.
What would be related is this document, however it says that it is outdated. Is there a newer document anywhere? I really don't find anything else. http://www.cocos2d-x.org/wiki/Multi_resolution_support
You can look into using different asset folders for various resolution sizes. So you might have "/sd/" for < 480 height, "/hd/" for < 800 height, and "/ipadhd/" for others.
FileUtils::getInstance()->setSearchResolutionsOrder(...)
You can also change the content scale factor yourself in the AppController.mm using:
// should behave as if all art is @1x device
Director::getInstance()->setContentScaleFactor(1.0);
// should behave as if all art is @2x device
Director::getInstance()->setContentScaleFactor(2.0);
// should behave as if all art is @4x
Director::getInstance()->setContentScaleFactor(4.0);
This hasn't been updated yet, but still has some info: http://www.cocos2d-x.org/wiki/Multi_resolution_support