ipad spritesheet help

I’ve got a sprite and I’m using the dynamic image scaling if statements to choose the higher rez @2x images on iphone4. (as explained here: http://developer.anscamobile.com/forum/2010/12/08/dynamic-retina-spritesheets-heres-how)

The problem I’m having is on the iPad, it still chooses the lower rez sprite, all other images are fine it’s just the sprite itself.

I can force it to pick the @2x image but then its not scaled properly and is too large.

Anyone got any pointers to get round this? [import]uid: 29676 topic_id: 11543 reply_id: 311543[/import]

I used the @2x version of the sprite sheet, ie I use the retina version

ie image is 30 x 30px
@2x image is 60 x 60px

I set the sprite box size for 60 x 60
and then I set .xScale 0.5 and .yScale = 0.5

results in correct image in iPad/iphone/iphone4 [import]uid: 63413 topic_id: 11543 reply_id: 41897[/import]

doesn’t the latest build support retina sprites? Maybe it’s causing a conflict if you use the method explained in your link? [import]uid: 44010 topic_id: 11543 reply_id: 41898[/import]

Not sure, can anybody confirm?

I’ll try taking out the if statements etc and see if it renders properly without any extra’s tonight. [import]uid: 29676 topic_id: 11543 reply_id: 41899[/import]

How is this different than using one size and letting config.lua scale the images? I had trouble with physics and scaling when I first started and went the config.lua route, but perhaps that’s not the best way? [import]uid: 58455 topic_id: 11543 reply_id: 41900[/import]

I think the config version works fine for normal images but sprites didn’t seem to work with it in the past.

my problem might stem from display.contentScaleX == .5 then

If I change this to > 1 then it chooses the higher rez image on the ipad but it doesn’t scale it down to size properly so its massive. [import]uid: 29676 topic_id: 11543 reply_id: 41901[/import]

I wonder why that is? I would assume that under the covers, a sprite is just a collection of the same objects created with display:newImage(). [import]uid: 58455 topic_id: 11543 reply_id: 41908[/import]