Dynamic Scaling Challenge!

Here’s a good one for you guys to ponder.

I have a large, i.e. 1024x768 X 23 frame animation (and 512x384 version as well) that I want to use.

Here is the problem… The iPad 1 only has 256M of memory and my footprint while running this animation is around 115M.

For the iPhone4, 4s, iPad 2 and new iPad, I have plenty of memory and its not a problem. The iPad 1 with its 256M has the same footprint as the iPhone3Gs, which I can use scaling to force it to use the smaller files (which it runs fine on the 3Gs using the 512x384’s)
So just how do I target the iPad 1 in my config.lua? Do I do a one-off and put in an a test to see if I’m the iPad 1 and force the lower rez images?

If I just use the lower rez ones (which is what I’m currently doing) they look like ca-ca on the new iPad.

Have at this challenge!

[import]uid: 19626 topic_id: 25632 reply_id: 325632[/import]

What does your config.lua look like now?

This is the config.lua I use to design for iPhone Retina (640x960) but target any iOS device with content scaling:

[lua]application =
{
content =
{
width = 640,
height = 960,
scale = “letterbox”,
fps = 60,
antialias = false,
xalign = “center”,
yalign = “center”,
imageSuffix =
{
["-half"] = 0.5,
[""] = 1.0,
["-iPad"] = 1.06,
["-iPad@2x"] = 2.12,
},
}[/lua]

Of course that doesn’t discriminate between the iPad and the iPad2, which shouldn’t matter for your purposes. What looks good on one will look the same on the other. [import]uid: 44647 topic_id: 25632 reply_id: 103584[/import]

if system.getInfo("model") ~= "iPad" then  
 application =   
 {  
 content =  
 {  
 width = 768,  
 height = 1024,  
 scale = "zoomStretch",  
 },  
 imageSuffix = {  
 ["@1x"] = 0.468,  
 },  
 }  
else  
 application =   
 {  
 content =  
 {  
 width = 768,  
 height = 1024,  
 scale = "letterbox",  
 },  
 imageSuffix = {  
 ["@1x"] = 0.468,  
 },  
 }  
end  

For these projects all of my art is designed and scaled for 1024x768 and we are okay stretching it on other aspect ratio devices.

All art other than this transition doesn’t have other sizes and I only have a memory problem with the huge animation on the iPad 1. The 3Gs picks up the smaller versions. Right now, I’m loading the smaller versions regardless of the device since I haven’t figured out how to target the iPad 1. I’m guessing I could get the archtechtureInfo from system.getInfo() and put in a test to load the right graphics.
[import]uid: 19626 topic_id: 25632 reply_id: 103617[/import]