Migration from Kwik3
Content Area
- Kwik3 uses 1024x768 system. This fits very well for iPad devices and the size of a PSD with New Universal (@2x) is 2048*1536
application =
{
content =
{
width = 768,
height = 1024,
fps = 60,
scale = kScale,
imageSuffix = {
["@2"] = .5,
}
},
}
Kwik3’s imageSuffix @2 does not come with x but Kwik4 uses normal convention as @2x
- Kwik4 uses 320x480 system because standard Solar2D’s apps are usually 320x480 system, and it is good for both iPad and iPhone/Android. The scale factor is fixed at letterBox.
the size of a PSD with Ultimate config is 1920*1280
--calculate the aspect ratio of the device:
local aspectRatio = display.pixelHeight / display.pixelWidth
application = {
content = {
width = aspectRatio > 1.5 and 320 or math.ceil( 480 / aspectRatio ),
height = aspectRatio < 1.5 and 480 or math.ceil( 320 * aspectRatio ),
scale = "letterBox",
fps = 30,
imageSuffix = {
["@2x"] = 1.5,
["@4x"] = 3.0,
},
},
}