there is a practice i use
if you wanna make hd for Retina and sd for non-Retina you should design all resource based hd and with software you can produce sd
in resource you put hd and sd designs and in applicationDidFinishLaunching function you tell the to cocos2dx to pick right folder up based in device resolution
Yes, my question is really whether I should code everything for sd and scale by 2 for hd (as you did above), or whether I should code everything for hd and scale by 1/2 for sd (the other alternative), and what the practical differences between the two techniques are. Advice and insight?
Your code is common, in fact it is shared and used for hd and sd or lower quality resources
So you should prepare hd and sd design files and copy 2 folders(hd and sd) in Resources folder of project root
As i mentioned above in applicationDidFinishLaunching() function , we tell the cocos2d-x that if the device resolution width is greater than 768( Retinal Device) use hd folder as resources with scale factor 2 and else use sd folder ( non-retina) with scale factor 1 , that’s it
so it’s cocos2d-x job to handle that as we told it
Yes that is what I do, except I am doing the opposite: I am using hd with scale factor 1 and sd with scale factor 0.5. It’s almost the same, I’m wondering what are the differences (pros/cons) and whether I should change.
If I use ‘sd’ as design resolution and scale 2X for ‘hd’, then if I add a touch handler to drag something, won’t it be snapping to every second pixel? Isn’t that a reason to use ‘hd’ as design resolution and scale 0.5X for ‘sd’?
That is the kind of question I am asking, not how to do the scaling (I know that), but rather what are the implications of upscaling vs. downscaling?
For my style. I ignore all scaling and set design to match screen size. Then I use percentage of screen width or height to place and or move all my assets.
That’s also a valid approach, and I’m taking that approach in another project. However in this project, I’m making use of a fixed aspect ratio design, and allowing some cropping for different aspect ratios. I just wanted to know whether it was better to use HD or SD for the design resolution, what the impact would be.