hi people,
i have a problem when i tried to add a srpite to mte.
in my config i use ZoomStretch and suffix 2x for high resolutions, so i have spritesheets and spritesheets@2x.
I design the level with 32x32 tiles and when detects iphone4 that is 960x640 it looks for my spritesheet@2x and all is correct.
When i tried to add a sprite this way(player, enemies)… this way i get the problem.
playerSprite 300x62
playerSprite@2x : 600 x 124
[lua]
local playerSheet = graphics.newImageSheet( “images/playerSprite.png”, {width = 30, height = 62, numFrames = 10})
local sequenceData = {
{name = “standRight”, sheet = playerSheet, frames = {9,10}, time = 1500, loopCount = 0},
{name = “jumpRightdown”, sheet = playerSheet, frames = {7}, time = 1000, loopCount = 0},
{name = “runRight”, sheet = playerSheet, frames = {1,2,3,4,5,6}, time = 1000, loopCount = 0},
{name = “jumpRight”, sheet = playerSheet, frames = {8}, time = 300, loopCount = 0},
local player = display.newSprite(playerSheet, sequenceData)
local setup = {layer = mte.getSpriteLayer(1), kind = “sprite”, locX = locX, locY = locY,
levelWidth = 30, levelHeight = 62, offsetX = 0, offsetY = -16 }
mte.addSprite(player, setup)
player:setSequence( “runRight” )
player:play()
mte.setCameraFocus(player)
[/lua]
When the resolution is 480x320 the player sprite looks well, but when is a 2x resolution i only see the head of the player, as it doesn´t resize correctly the sprite.
the only way to see correctly is keeping the playerSprite and playerSprite@2x with the same size(300x62) , so in fact it resizes the normal playerSprite twice but doesn´t look well.
any idea?