Hello!
I read about the new “adaptive” scaling method introduced in Public Release 2014.2511 and it seems a good solution for the app I’m trying to make. The app should be optimized for iPad and tablet only.
My basic need is to display an image containing stripes with a fixed distance one from another and this distance should be exactly (or nearly, with very small differences) the same on all devices (number of stripes displayed can obviously change, that’ s not important).
I used a config.lua like this:
application =
{
content =
{
scale = “adaptive”,
fps = 60,
imageSuffix =
{
["@2x"] = 1.5
}
}
}
The issue is that I loaded 1x and 2x images but on simulator (Windows) I can’t have the 2x image loaded for higher resolution device. I print out these values:
print( display.pixelWidth )
print( display.actualContentWidth )
print( display.pixelWidth / display.actualContentWidth )
Orientation is landscape and the values I obtained are in the txt file attached. Scale factor never reaches 1.5.
Finally I tested the app on a Samsung Galaxy S3 and Samsung Galaxy Tab 2 7.0: images are correctly loaded on both (2x on S3, 1x on Tab 7.0).
I’m puzzled looking at scale factor and simulator behaviour (which are consistent!) and the results on my physical devices.
Where am I doing wrong? Any hint is welcome!! Thanks.