Game Development Reference
In-Depth Information
Screen settings
So if you have the Start Project option opened in Xcode, let's review the screen settings
for this game in AppDelegate.cpp . Inside the applicationDidFinishLaunch-
ing method, you should see this:
auto designSize = Size(1536, 2048);
glview->setDesignResolutionSize(designSize.width,
designSize.height, ResolutionPolicy::EXACT_FIT);
std::vector<std::string> searchPaths;
if (screenSize.width > 768) {
searchPaths.push_back("ipadhd");
director->setContentScaleFactor(1536/designSize.width);
} else if (screenSize.width > 320) {
searchPaths.push_back("ipad");
director->setContentScaleFactor(768/designSize.width);
} else {
searchPaths.push_back("iphone");
director->setContentScaleFactor(380/designSize.width);
}
auto fileUtils = FileUtils::getInstance();
fileUtils->setSearchPaths(searchPaths);
So we basically start the same way we did in the previous game. The majority of sprites in
this game are circle-shaped and you may notice some distortion in different screens; you
should test the same configuration but using different ResolutionPolicies , such as
SHOW_ALL .
Search WWH ::




Custom Search