SlideShare uma empresa Scribd logo
1 de 24
Resolution in game
developing
iPhone game with cocos2d
Table of Contents
IOS family
Resolution in Cocos2d-iphone
Resolution in Cocos2d-x
・Design resolution
・Resolution policy
・Content scale factor
・Resolution policy advice
IOS family
Type Screen size (pixel)
iPhone 480, 320
iPhone Retina 960, 640
iPhone 5 1136, 640
iPad 1024, 768
iPad Retina 2048, 1536
Cocos2d-iphone
IOS family
Resolution in Cocos2d-iphone
Resolution in Cocos2d-x
・Design resolution
・Resolution policy
・Content scale factor
・Resolution policy advice
Resolution in cocos2d-
iPhone
Type Screen size
(pixel)
Point size in
cocos2d
(point)
Scale
factor
iPhone 480, 320 480, 320 1
iPhone
Retina
960, 640 480, 320 2
iPhone 5 1136, 640 568, 320 2
iPad 1024, 768 1024, 768 1
iPad
Retina
2048, 1536 1024, 768 2
One image for all devices?
For example:
image size: (1136, 640)  For iPhone 5
Is it available for iPhone retina?
YES!
CCSprite *sprite = [CCSprite
spriteWithFile:@"bg_town.png"];
CGSize winsize = [[CCDirector sharedDirector] winSize];
sprite.position = ccp(winsize.width / 2, winsize.height / 2);
[self addChild:sprite];
Center aligned
Is it available for iPhone 3GS?
NO!
If set sprite.scale = 0.5f;
So we can use this
solution?
NO!
Reason: MEMORY!
Device Installed
Memory
Available
Memory
Memory
Warning
Threshold
First generation
Second
generation
128MB Around 30MB Around 20MB
iPhone 3GS
iPad
256MB Around 90MB Around 70MB
iPhone 4/4S
iPad 2
512MB Around
300MB
Around
250MB
Is it available for iPad?
Size of iPhone retina: (960, 640)
Size of iPad: (1024, 768)
Answer: NO!
Reason: Coordinator is different!
Coordinator of iPhone retina: (480, 320)
Coordinator of iPad: (1024, 768)
Table of Contents
IOS family
Resolution in Cocos2d-iphone
Resolution in Cocos2d-x
・Design resolution
・Resolution policy
・Content scale factor
・Resolution policy advice
Resolution in cocos2d-x
Type Screen size
(pixel)
Point size in
cocos2d
(point)
Scale
factor
iPhone 480, 320 ? ?
iPhone
Retina
960, 640 ? ?
iPhone 5 1136, 640 ? ?
iPad 1024, 768 ? ?
iPad
Retina
2048, 1536 ? ?
You can set point size and scale factor freely!
Design resolution size
CCEGLView::sharedOpenGLView() ->
setDesignResolutionSize(width, height, policy)
(width, height) is design resolution, i.e. point size.
policy defines the relationship between point size
and device screen size.
Resolution Policy in
cocos2d-x 1
scale_x = device_screen_size.width /
point_size.width
scale_y = device_screen_size.height /
point_size.height
scale: The scale ratio to scale image from
point size.
Resolution Policy in
cocos2d-x 2
kResolutionExactFit
In x axis, scale = scale_x
In y axis, scale = scale_y
kResolutionNoBorder
scale = max(scale_x, scale_y)
kResolutionShowAll
scale = min(scale_x, scale_y)
Content Scale factor
CCDirector::sharedDirector() ->
setContentScaleFactor(scaleFactor)
Scale factor define the ratio of image size to
resolution size.
Example
Image: (1136, 640)
-> For iPhone 5
Target
Device: iPad (1024, 768)
Resolution size(Point size): (480, 320)
scaleFactor = 1024.0 / 480 = 2.13
Policy: kResolutionExactFit
1136
768
1024
721
(1136 / scaleFactor ,
640 / scaleFactor )
( (1136 / scaleFactor ) * (1024.0 / 48
(640 / scaleFactor ) * (768.0 / 320) )
->
(1136, 721)
Resolution Policy Advice 1
kResolutionExactFix
The whole point size is available in the
screen.
The whole image will be shown in the
screen, but may appear stretched or
compressed.
Don’t choose this.
Resolution Policy Advice 2
kResolutionNoBorder
It is full screen. There is no black belt.
But not the whole point size is available in the
screen.
CCSize visibleOrigin =
CCDirector::sharedDirector()->getVisibleOrigin();
CCSize visibleSize =
CCDirector::sharedDirector()->getVisibleSize();
From visibleOrigin and visibleSize, you get the
rect that can be display in the screen.
Resolution Policy Advice 3
kResolutionShowAll
The whole point size is available in the screen.
Will have black belt in horizontal or vertical
direction
Thank you!

Mais conteúdo relacionado

Semelhante a Resolution in cocos2d family

Tech Talk July 29 - Pixel
Tech Talk July 29 - Pixel Tech Talk July 29 - Pixel
Tech Talk July 29 - Pixel Indosystem
 
Supporting multi screen in android cn
Supporting multi screen in android cnSupporting multi screen in android cn
Supporting multi screen in android cnrffffffff007
 
Desigining for auto_layout
Desigining for auto_layoutDesigining for auto_layout
Desigining for auto_layoutJosh Burton
 
Lumia App Labs #17: Optimising your Nokia Lumia apps for large screen phones
Lumia App Labs #17: Optimising your Nokia Lumia apps for large screen phonesLumia App Labs #17: Optimising your Nokia Lumia apps for large screen phones
Lumia App Labs #17: Optimising your Nokia Lumia apps for large screen phonesLucian Tomuța
 
Idiot's Guide to viewport and pixel
Idiot's Guide to viewport and pixelIdiot's Guide to viewport and pixel
Idiot's Guide to viewport and pixelNathan Campos
 
Android在多屏幕、多设备上的适配 | 布丁 任斐
Android在多屏幕、多设备上的适配 | 布丁 任斐Android在多屏幕、多设备上的适配 | 布丁 任斐
Android在多屏幕、多设备上的适配 | 布丁 任斐imShining @DevCamp
 
Developing AIR for Mobile with Flash Professional CS5.5
Developing AIR for Mobile with Flash Professional CS5.5Developing AIR for Mobile with Flash Professional CS5.5
Developing AIR for Mobile with Flash Professional CS5.5Chris Griffith
 
Tk2323 lecture 2 ui
Tk2323 lecture 2   uiTk2323 lecture 2   ui
Tk2323 lecture 2 uiMengChun Lam
 
3dsmaxdesign 2010 using_autodesk_revit_files00
3dsmaxdesign 2010 using_autodesk_revit_files003dsmaxdesign 2010 using_autodesk_revit_files00
3dsmaxdesign 2010 using_autodesk_revit_files00An Nam Education
 
Game development with Cocos2d
Game development with Cocos2dGame development with Cocos2d
Game development with Cocos2dVinsol
 
High DPI for desktop applications
High DPI for desktop applicationsHigh DPI for desktop applications
High DPI for desktop applicationsKirill Grouchnikov
 
Niels Leenheer - Weird browsers - code.talks 2015
Niels Leenheer - Weird browsers - code.talks 2015Niels Leenheer - Weird browsers - code.talks 2015
Niels Leenheer - Weird browsers - code.talks 2015AboutYouGmbH
 
Responsive & Adaptive Design @mLearnCon15 Nick Floro
Responsive & Adaptive Design @mLearnCon15 Nick FloroResponsive & Adaptive Design @mLearnCon15 Nick Floro
Responsive & Adaptive Design @mLearnCon15 Nick FloroNick Floro
 
Android training day 3
Android training day 3Android training day 3
Android training day 3Vivek Bhusal
 

Semelhante a Resolution in cocos2d family (20)

Tech Talk July 29 - Pixel
Tech Talk July 29 - Pixel Tech Talk July 29 - Pixel
Tech Talk July 29 - Pixel
 
Programmers guide
Programmers guideProgrammers guide
Programmers guide
 
Supporting multi screen in android cn
Supporting multi screen in android cnSupporting multi screen in android cn
Supporting multi screen in android cn
 
Desigining for auto_layout
Desigining for auto_layoutDesigining for auto_layout
Desigining for auto_layout
 
Lumia App Labs #17: Optimising your Nokia Lumia apps for large screen phones
Lumia App Labs #17: Optimising your Nokia Lumia apps for large screen phonesLumia App Labs #17: Optimising your Nokia Lumia apps for large screen phones
Lumia App Labs #17: Optimising your Nokia Lumia apps for large screen phones
 
Idiot's Guide to viewport and pixel
Idiot's Guide to viewport and pixelIdiot's Guide to viewport and pixel
Idiot's Guide to viewport and pixel
 
Android在多屏幕、多设备上的适配 | 布丁 任斐
Android在多屏幕、多设备上的适配 | 布丁 任斐Android在多屏幕、多设备上的适配 | 布丁 任斐
Android在多屏幕、多设备上的适配 | 布丁 任斐
 
Google VR SDK 101
Google VR SDK 101Google VR SDK 101
Google VR SDK 101
 
Website Shortcut Graphics Recommendations
Website Shortcut Graphics RecommendationsWebsite Shortcut Graphics Recommendations
Website Shortcut Graphics Recommendations
 
Developing AIR for Mobile with Flash Professional CS5.5
Developing AIR for Mobile with Flash Professional CS5.5Developing AIR for Mobile with Flash Professional CS5.5
Developing AIR for Mobile with Flash Professional CS5.5
 
Tk2323 lecture 2 ui
Tk2323 lecture 2   uiTk2323 lecture 2   ui
Tk2323 lecture 2 ui
 
3dsmaxdesign 2010 using_autodesk_revit_files00
3dsmaxdesign 2010 using_autodesk_revit_files003dsmaxdesign 2010 using_autodesk_revit_files00
3dsmaxdesign 2010 using_autodesk_revit_files00
 
About Cocos2djs
About Cocos2djsAbout Cocos2djs
About Cocos2djs
 
Material design
Material designMaterial design
Material design
 
Cocos2d for beginners
Cocos2d for beginnersCocos2d for beginners
Cocos2d for beginners
 
Game development with Cocos2d
Game development with Cocos2dGame development with Cocos2d
Game development with Cocos2d
 
High DPI for desktop applications
High DPI for desktop applicationsHigh DPI for desktop applications
High DPI for desktop applications
 
Niels Leenheer - Weird browsers - code.talks 2015
Niels Leenheer - Weird browsers - code.talks 2015Niels Leenheer - Weird browsers - code.talks 2015
Niels Leenheer - Weird browsers - code.talks 2015
 
Responsive & Adaptive Design @mLearnCon15 Nick Floro
Responsive & Adaptive Design @mLearnCon15 Nick FloroResponsive & Adaptive Design @mLearnCon15 Nick Floro
Responsive & Adaptive Design @mLearnCon15 Nick Floro
 
Android training day 3
Android training day 3Android training day 3
Android training day 3
 

Último

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 

Último (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Resolution in cocos2d family

  • 2. Table of Contents IOS family Resolution in Cocos2d-iphone Resolution in Cocos2d-x ・Design resolution ・Resolution policy ・Content scale factor ・Resolution policy advice
  • 3. IOS family Type Screen size (pixel) iPhone 480, 320 iPhone Retina 960, 640 iPhone 5 1136, 640 iPad 1024, 768 iPad Retina 2048, 1536
  • 4. Cocos2d-iphone IOS family Resolution in Cocos2d-iphone Resolution in Cocos2d-x ・Design resolution ・Resolution policy ・Content scale factor ・Resolution policy advice
  • 5. Resolution in cocos2d- iPhone Type Screen size (pixel) Point size in cocos2d (point) Scale factor iPhone 480, 320 480, 320 1 iPhone Retina 960, 640 480, 320 2 iPhone 5 1136, 640 568, 320 2 iPad 1024, 768 1024, 768 1 iPad Retina 2048, 1536 1024, 768 2
  • 6. One image for all devices? For example: image size: (1136, 640)  For iPhone 5
  • 7. Is it available for iPhone retina? YES! CCSprite *sprite = [CCSprite spriteWithFile:@"bg_town.png"]; CGSize winsize = [[CCDirector sharedDirector] winSize]; sprite.position = ccp(winsize.width / 2, winsize.height / 2); [self addChild:sprite];
  • 9. Is it available for iPhone 3GS? NO!
  • 11. So we can use this solution? NO! Reason: MEMORY! Device Installed Memory Available Memory Memory Warning Threshold First generation Second generation 128MB Around 30MB Around 20MB iPhone 3GS iPad 256MB Around 90MB Around 70MB iPhone 4/4S iPad 2 512MB Around 300MB Around 250MB
  • 12. Is it available for iPad? Size of iPhone retina: (960, 640) Size of iPad: (1024, 768) Answer: NO! Reason: Coordinator is different! Coordinator of iPhone retina: (480, 320) Coordinator of iPad: (1024, 768)
  • 13. Table of Contents IOS family Resolution in Cocos2d-iphone Resolution in Cocos2d-x ・Design resolution ・Resolution policy ・Content scale factor ・Resolution policy advice
  • 14. Resolution in cocos2d-x Type Screen size (pixel) Point size in cocos2d (point) Scale factor iPhone 480, 320 ? ? iPhone Retina 960, 640 ? ? iPhone 5 1136, 640 ? ? iPad 1024, 768 ? ? iPad Retina 2048, 1536 ? ? You can set point size and scale factor freely!
  • 15. Design resolution size CCEGLView::sharedOpenGLView() -> setDesignResolutionSize(width, height, policy) (width, height) is design resolution, i.e. point size. policy defines the relationship between point size and device screen size.
  • 16. Resolution Policy in cocos2d-x 1 scale_x = device_screen_size.width / point_size.width scale_y = device_screen_size.height / point_size.height scale: The scale ratio to scale image from point size.
  • 17. Resolution Policy in cocos2d-x 2 kResolutionExactFit In x axis, scale = scale_x In y axis, scale = scale_y kResolutionNoBorder scale = max(scale_x, scale_y) kResolutionShowAll scale = min(scale_x, scale_y)
  • 18. Content Scale factor CCDirector::sharedDirector() -> setContentScaleFactor(scaleFactor) Scale factor define the ratio of image size to resolution size.
  • 19. Example Image: (1136, 640) -> For iPhone 5 Target Device: iPad (1024, 768) Resolution size(Point size): (480, 320)
  • 20. scaleFactor = 1024.0 / 480 = 2.13 Policy: kResolutionExactFit 1136 768 1024 721 (1136 / scaleFactor , 640 / scaleFactor ) ( (1136 / scaleFactor ) * (1024.0 / 48 (640 / scaleFactor ) * (768.0 / 320) ) -> (1136, 721)
  • 21. Resolution Policy Advice 1 kResolutionExactFix The whole point size is available in the screen. The whole image will be shown in the screen, but may appear stretched or compressed. Don’t choose this.
  • 22. Resolution Policy Advice 2 kResolutionNoBorder It is full screen. There is no black belt. But not the whole point size is available in the screen. CCSize visibleOrigin = CCDirector::sharedDirector()->getVisibleOrigin(); CCSize visibleSize = CCDirector::sharedDirector()->getVisibleSize(); From visibleOrigin and visibleSize, you get the rect that can be display in the screen.
  • 23. Resolution Policy Advice 3 kResolutionShowAll The whole point size is available in the screen. Will have black belt in horizontal or vertical direction