I’ve been trying to upgrade from an older version of cocos2d-x to the newest version and I’m currently going through and fixing errors that have occurred.
The big one for me now has to do with font working with multiple resolutions.
I’m only using one font and in my old project I had 2 .png files (Font.png and Font-hd.png) and 2 .plist files (Font.plist and Font-hd.plist) and this worked brilliantly.
Now my understanding is that the multi-resolution code has changed and you no longer need the -hd suffix and instead use serperate folders to hold the different files dependant on their resolution and then set a different search path. My first question is this correct?
Secondly, is this the same for fonts? I have a Fonts folder in my Resources folder. In the Fonts folder are two folders names iphone and iphonehd and they each have the Font.png and Font.plist files that correspond to the resolution they are meant to contain. However I am getting an odd warning in xcode stating “Multiple build commands for output file”. Ofcourse this is the case, I have two files named the same thing but in different folders.
I think this is linked to a bug I’m having where the game is using the higher resolution assets on my lower resolution device. It only does it sporadically but its still a bug I need to fix before release.