iOS + cocos2d: how to account for sprite's position for the different device dimensions in an universal app?

Posted by fuzzlog on Game Development See other posts from Game Development or by fuzzlog
Published on 2014-05-30T06:00:39Z Indexed on 2014/05/30 9:39 UTC
Read the original article Hit count: 237

Filed under:
|
|

All the questions I've seen regarding iOS universal apps (with or without cocos2d) deal with the "how to add graphics to a universal app".

My question is, how does the code need to be written to ensure that the sprites appear appropriately on the screen (given that an iPhone 5's resolution is not proportional to an iPad's resolution)?

Is it just a bunch of "if" statements and duplicate code or do iOS/cocos2d provide common function calls that will place the sprites at an appropriate position?

© Game Development or respective owner

Related posts about game-design

Related posts about ios