some suggestion about Multi-resolution in cocos2d-x 2.0.4.
1.Use CCFileUtils::sharedFileUtils()->setResourceDirectory(path_string) is not a good way, it conflict with xcode’s multiple target resolution.
As you know, a file adding to xcode only by “Recursively create groups for any added folders” way can set its target belongs to.
But if you use so setResourceDirectory, you must add your picture by “Create Folder References for any added folders” way to add it to a blue color group.
But If your product has many versions, mutiple target is the best way to manage them.
2.About kResolutionNoBorder.It’s the best way to make a game.It will be without distortion ,and If you make the coordinates base on ‘visible rectangle’ all the game elements will show in screen, so perfect.
But there is a much easier way to do this by adding your background image not in Opengl Viewport. In ios for example, you can setDesignResolutionSize to (480, 320) and use kResolutionShowAll policy.But you don’t need add background picture in a scene.And in every scene’s
UIImageView image = initWithImage:];
image.frame = .bounds;
CCEGLViewopenglView = [[CCDirector sharedDirector] openglView];
[[RootViewController shared].view insertSubview:image belowSubview:openglView];
the code in onEnter() should be platform-dependent, and I only show how to do it in ios,so i write it in object-c.
Maybe cocos2d-x should offer a function to do this, add a background picture below game’s Opengl Viewport,it is a full screen background.And you can change it any time.Hope adding this to make kResolutionNoBorder easier.