Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Game Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-22-2011, 04:07 PM   #1 (permalink)
Try This At Home
 
Gweetle's Avatar
 
Join Date: Nov 2010
Location: Planet Earth
Posts: 208
Gweetle is on a distinguished road
Default Cocos2d-Stretch Screen for iPad

I was wondering if there is a way to stretch the screen's view, from the iPhone size to the iPad size. I already know how to detect if the device is an iPad, and I was just hoping there is a way to stretch the whole screen without having to recode the way every single object is drawn.
__________________
Gweetle is offline   Reply With Quote
Old 02-23-2011, 10:19 PM   #2 (permalink)
Indie Dev
 
hm50's Avatar
 
Join Date: May 2009
Location: South Bend, Indiana
Posts: 162
hm50 is on a distinguished road
Wink

If I understand correctly. You want to have an iPhone sized image use all of the background on an iPad.

There are ways to stretch the image, but I think you may be disappointed with the blurred or distorted results. I make individual images for iPhone, iPhone Retina (2X size of iPhone), and one for iPad. Then use your iPad check or isRetinaEnabled (on Cocos2D) to determine device and then which image to use.

However, maybe your image isn't really detailed, so here are some resizing options:

1) sprite.scale = 2.0; (scales the sprite to twice it's size)
2) sprite.scaleX = Value; (only scales the sprite in the x axis)
3) sprite.scaleY = Value; (only scales the sprite in the y axis)

Hope that helps!!
__________________
iPhone 3G

Support Indie Devs!! (that goes for newbs too!)

Apps:
Spell Blocks
See Read Say
iStatus
myVIP
myMVP
hm50 is offline   Reply With Quote
Old 02-27-2011, 03:48 PM   #3 (permalink)
Registered Member
 
Join Date: Feb 2011
Location: USA
Posts: 11
linkedPIXEL is on a distinguished road
Default

Are you looking to create a universal app so that it runs fullscreen on both the iPhone and iPad? If so, you should be able to simply use the "Upgrade Current Target to iPad" option within Xcode. Depending on the complexity of the app and features/controllers used, there may be some additional work required to ensure all elements work on both devices.

See: Creating a Universal Application
__________________
linkedPIXEL is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 423
7 members and 416 guests
chemistry, ChrisYates, hussain1982, Retouchable, skrew88, SLIC, xzoonxoom
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,679
Threads: 94,128
Posts: 402,921
Top Poster: BrianSlick (7,990)
Welcome to our newest member, xzoonxoom
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:11 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0