Porting IOS game to Android - multi resolution suppor

Porting IOS game to Android - multi resolution suppor
0.0 0


I have a IOS game which is written in cocos2d , now I want to port it for Android devices which only support the latest os version jelly bean. I did all the basic cocos2dx/ndk environment setting and able to test the hello world in my device (gallaxy nexus). I have two versions of sprites used for iPhone one is 320x480 & 320x568 portrait mode game.

I am new to android platform so I read the basic difference between resolution , screen size , dpi , now I am confused on how to proceed from here on porting my game for multiple resolutions. I am struck on managing sprite and background image resolution for these latest Android devices. I want my game to run on google devices and samsung s2,s3. I have only these devices on hand for testing.

Please guide me or refer some articles/tutorials.


Read this [[Multi Resolution Support]]


Thanks for your reply. I am wondering how many different resolution I should target for Android? I didn’t understand how to load those sprite from different folders ?


How many android resolution u want to support its your personal choice. But to be precise there are 5 major resolutions in Android and others are variant to it.

Create 5 folders under resource directory

  1. xSmall (240x320)
  2. Small. (320x480)
  3. Medium (800x480)
  4. Large (1024x768)
  5. xLarge (2048x1536)

Create all graphics according to folder size and keep same name of a sprite in all folder. Now as suggested in the multi resolution thread given wang, use visible rectangle to place your graphics. Place the gfx in terms of percentage rather than real pixel.

Give a try and let me know.


Thank you! Its working now , I am able to load the sprites according to the above resolution types. As part of my experiment I tried to render a Back ground image

PNG Image size - (1184 x 720)
Device Galaxy Nexus - (1,280 x 720 pixels)
Design Resolution - (480 x 320 )
Generic Larger Resolution - (768 x 1024)
Resolution Policy - kResolutionNoBorder

The problem is I couldn’t see the whole image , actually its cutting off on sides - Top,Left & right. Since my project is Android only , I already have my IOS game (GiftRain) in App Store free App. Now I want to port the same game for Android , after looking into the below resolutions I am wondering how to generalize the Resolution for all these target devices.

One more issue is most of the latest Android phone has Navigation bar which takes few pixel so it one more headache for my designer.

1280x720 , 960x540 , 960x540 , 800x480 , 1920x1080 , 1280x720 , 1280x720 ,1280x720 , 960x540 , 960x540


Background will cut a little bit to fit into the resolution, ask the designer to make smartly the background image and avoid keeping the important stuffs in the corner (only for full screen image). Other game objects you can place it by using coordinates in percentage and use visible rect to place the components.

If your designer has still confusion, then Give me the link of your iOS app to visualise the background and in-game elements.

Good Luck!


I understand the whole point but the problem is with my Game world. I have designed my game such a way that all 4 sides plays an important role and left the middle area for player interaction (Touch , Swipe) , now I have already started redesigning the game world for Android platform to accommodate different resolution. Also thinking of targeting the game for devices that support API level between 14 to 17 and make resolution fixed 320 x 480 (w x h) across all the mobile devices (Assuming only latest smartphones will fall into this API filtering) .
We also working on one more route that is , divide the world vertically into 2 half and use rendertotexture for the middle portion , let me see how it goes :slight_smile:

Thanks for asking , here is my game little game https://itunes.apple.com/us/app/id589114141?mt=8 and Game Play video - http://www.youtube.com/watch?v=WgODg7shGjg