Thanks to Giovanni Zito and Francis Styck’s and their support for the marmalade side of Cocos2d-x I have pretty much got my android port good to go but I have a few questions regarding supporting different screen resolutions.
Whats the best way of handling this via marmalade and cocos2d-x? Is the best way to have different asset sets and on startup loading in the relevant one for that screen size? My current graphics work fine on a HTC Wildfire S but as soon as I load the game on something like a Samsung Wave it only takes up a quarter of the screen. I wasn’t sure what the proper workflow was and guess its quite a common question.
Cheers Francis, I know its not ideal but I have just used the graphics from my iOS version and using the screen width I scale the graphics to fit.
This works fine with slight black borders on all the devices I have tested on which is fine and as I would expect but I just cant get the graphics to position themselves correctly in Y. I use a similar function to what I do on iPad:
This works fine in X but stretches out in Y, I am guessing I am missing something obvious but can’t put my finger on it. Any ideas? Once this is fixed my game is good to go
The simplest method that I found is to add all of the objects to a “root” node, then scale this node based on your “design resolution” and the actual resolution. For a project that I am currently working on that is what we’ve done. We’ve designed for the iPad and then scaled the “root” node down for the iPhone/iPod Touch. Very easy and we haven’t run into any memory issues yet.