Multi Resolution in Android, IOS and Windows Devices

Can anyone tell the background sizes so that they support all android, ios and windows devices?
I guess 4 or 5 sizes must be sufficient to support all available devices.

Mobile devices have largely all different screen sizes, just check this link.
What you are looking for is a way to have your game’s display size adapt to the screen size of the device it is running on, and a way you can do it is inside appDelegate.cpp set the design resolution equal to the device’s screen size, then when calling setDesignResolutionSize you pass ResolutionPolicy::NO_BORDER as the ResolutionPolicy parameter.
In code:

auto director = Director::getInstance();
auto glview = director->getOpenGLView();
auto deviceSize = director->getVisibleSize();
glview->setDesignResolutionSize(deviceSize.width, deviceSize.height, ResolutionPolicy::NO_BORDER);
   

This link http://pooperpig.com/?p=41 and the link to the spreadsheet it includes might be of interest.

Rather than creating many assets to support all android, ios and windows devices why don’t you try to create one big asset that can support them and play with resolution policy and design resolution size. I’ve suggested a solution for multi resolution by implementing a technique from v-play and I’ve explained it all here long time ago

If you do that, then you inevitably need to scale by large amounts which sometimes looks crap!
The OP asked for the different resolution sizes…

If we use Big Assets for all devices, it might cause the game to slow down in smaller devices due to over scaling.

@Maxxx: I looked at the setDesignResolution() code in CCGLView.cpp. Does the whole viewport gets Scaled down or does every Node in the game get Scaled down separately?

I honestly don’t know; I would imagine that each texture would be scaled by ‘walking the tree’ rather than rendering everything then scaling - but someone far cleverer than me probably has the answer?

We have a tutorial series covering all of this http://www.sonarlearning.co.uk/coursepage.php?topic=game&course=cocos2d-x-multi-device-2