Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Dynamic resolution for Ipad 3
Started by alexandr Jun 14 2012 04:18 AM

No replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

alexandr

[GLOBAL: userInfoPane.html]
alexandr
  • Observer

  • 27 posts
  • Corona SDK

Hi all, With the release of three Ipad a question to support his resolution. Previously, I used 1024-768 and scale for all other device and the quality is not lost.

With images it is clear in the config
width = 768,
height = 1024,
scale = "letterbox",
imageSuffix =
{
["@2x"] = 2, - images with "@ 2x" appended will be used for iPad3
}

In code
local bg = display.newImageRect( "background.png", 768, 1024)
and for Ipad3 corona automatic select background@2x.png with size 1536*2048. And all fine.

But what do you do with animation?

local imagePath = "luaFile.png"
local dataClassPath = REQUIRE("luaFile").getSpriteSheetData()
local Frames = sprite.newSpriteSheetFromData( imagePath, dataClassPath )

local spriteSet = sprite.newSpriteMultiSet(
{
{ sheet = Frames , frames = idleAnimation },
}
)

So if I create "luaFile.png" and "luaFile@2x.png" ; luaFile.lua and luaFile@2x.lua corona for Ipad3 dont get avtomatic luaFile@2x.png or I or am I doing something wrong?

I will be glad to any example. How do you?
uid: 91708 topic_id: 27490 reply_id: 327490



[topic_controls]
[/topic_controls]