CocosBuilder and iPad 3 retina

Forums Programming editors / tools: CocosBuilder et al CocosBuilder and iPad 3 retina

This topic contains 12 replies, has 5 voices, and was last updated by  upigames 1 year, 11 months ago.

Viewing 13 posts - 1 through 13 (of 13 total)
Author Posts
Author Posts
May 17, 2012 at 8:12 am #241599

hazza
@hazza

Is there any way to support iPad 3 retina images in one .ccb file?

For iPhone it’s very simple. Create image.png, image-hd.png. CocosBuilder will hide image with -hd extension but on iphone with retina you will get double sized images.

I tried to do the same with iPad file: I created image-ipad.png and image-ipadhd.png but it doesn’t fork.

Any ideas?

May 17, 2012 at 9:56 am #377516

hazza
@hazza

No ides?

May 17, 2012 at 10:28 am #377517

miro
@miro

Hi hazza,

which cocos2d version are you using? The suffix -ipadhd and -ipad is only supported by version 2.0.

The documentation of cocos2d only says, that “in cocos 0.9 the suffix -ipad and -ipadhd is not supported”. I have searched over 5 hours to get an answer for the question, if cocos 1.0.1 supports this suffix, and no, it doesn’t!

Hope it helps you.

May 18, 2012 at 5:42 pm #377518

hazza
@hazza

I’m using 2.0 version.

CocosBuilder is very good tool and I hope it will support iPad 3 retina in a nearest future…

May 18, 2012 at 8:50 pm #377519

vik
Participant
@vik

The latest version (master branch) on GitHub has support for iPad retina. Just include your -ipad and -ipadhd images and CocosBuilder will display the -ipad image (if you set the current resolution setting to do so). When loaded in runtime, -ipadhd will be loaded by cocos2d.

May 22, 2012 at 4:55 pm #377520

upigames
Participant
@upigames

Download the latest version on master branch and configure two resolutions, one for -ipad and another one for -ipadhd. But doesn’t work.

How can I change from one resolution to another? I use TexturePacker pvr.ccz textures and latest version doesn’t recognize it. The selector fields is frozen.

Using Cocos2D 2.0rc1.

Thanks in advance.

May 23, 2012 at 3:32 pm #377521

vik
Participant
@vik

You just create a setting for iPad. Cocos2d works with points and will automatically scale your positions up to the double pixels, just make sure you provide -ipadhd images in your project.

May 23, 2012 at 6:07 pm #377522

upigames
Participant
@upigames

Have two problem about this:

- Latest master branch from CocosBuilder doesn’t work on select fields for images and textures

- Have -ipad and -ipadhd in the project. What kind of images set I must use to make my Layer? I create 1024×768 layer with -ipad images, but have -ipadhd in the project with the same names.

Seems I’m lost on this new functionality.

Thanks in advance for your patience!

May 23, 2012 at 7:15 pm #377523

vik
Participant
@vik

The images with extensions will not show up in CocosBuilder. You will need a example.png, example-ipad.png and an example-ipadhd.png. In the resolution settings you should set the extension to be -ipad, CocosBuilder will then select the -ipad images even though the one without the extension is displayed in the list.

If you are doing an ipad only app, you will not need to include the image without the extension in your project (you can just include -ipad and -ipadhd).

Hope this helps!

May 23, 2012 at 8:43 pm #377524

upigames
Participant
@upigames

And what about plist and pvr.ccz? Have two sets with -ipad and -ipadhd but the images inside the pvr texture are without any extension and have exactly the same name in each file. Example:

intro-ipad.plist

intro-ipad.pvr.ccz

intro-ipadhd.plist

intro-ipadhd.pvr.ccz

Inside the PVR textures files are:

intro.png

button1.png

button2.png

Which file I must use to make the draw? Or may I will have another one without any -ipad or -ipadhd (intro.plist, intro.pvr.ccz) and have to use it this one (but next, I don’t need to copy to Xcode, of course). Textures are made with TexturePacker.

Thanks for your answers and advices. It help me a lot!

May 24, 2012 at 1:13 am #377525

Dragyn
Moderator
@dragyn

I wanted to chime because @miro was technically correct that 1.0.1 doesn’t natively support the -ipad and -ipadhd extensions. However, 1.1.0 (at least as of beta2b) DOES support those extensions – you don’t have to move to 2.0 to get that support.

(Sorry, can’t comment on CocosBuilder and 2.0 – not using them yet!)

May 24, 2012 at 4:54 pm #377526

upigames
Participant
@upigames

Now, with CocosBuilder 1.1beta1 and CCBReader, program loads perfectly the textures. I use -ipad textures for drawing and when I use Retina, automatically uses -ipadhd. But there’s a problem: when load -ipad positions are the ones put on CocosBuilder, but -ipadhd load positions more than 3 times the real ones. Example:

CClayer size: 1024×768

Graphics used: png inside a -ipad texture

Position: 486,197 (Perfect on iPad & iPad 2)

Position: 1548,705 (on new iPad Retina)

The same object but different positions with the same cbbi. Why?

Thanks in advance

P.D. – When position is 0,0, loads well

May 25, 2012 at 11:37 am #377527

upigames
Participant
@upigames

Works with CocosBuilder 2.0beta0… Look for the post when I explain how i made it!!!

Thanks

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.