Here is the full config.lua:
application =
{
launchPad = false,
content = {
width = 320,
height = 480,
scale = "letterBox",
fps = 30,
imageSuffix = {
["@2x"] = 2,
["@4x"] = 4,
},
},
}
the whole puzzle image and it is: 385x320. @2x - 770x640 @4x - 1540x1280 and that is what I am masking. Again though, I removed the @4x image and reduced the file size of the @2x image from 514kb to 79.5kb and saw no performance improvements.
The mask file size always stays 388x320. The mask files are less than 7kb.
I really would not like to break it up if there is another way around it. I eventually am going to make a puzzle app that would need to be able to mask the whole image but the piece to work properly and this project is really just a stepping stone to that.
They go from .3 to 1.0. They are .3 on the screen to start to save space. They are scaled up to 1.0 when touched and then remain at 1.0 when placed in the correct spot on the puzzle.
I could try changing it to isVisible = false for those that are not used at first, but eventually all would be visible by the end of the puzzle.
Here is an example of the code I am using to setup the first piece of a puzzle. There are several variables as things change when different numbers of pieces are being used:
fullpuzxref[1] = -150
fullpuzyref[1] = -130
piecesmask[1] = graphics.newMask( "24p1.png" )
piecescale = .3
fullpuz[1] = display.newImageRect( "puz1top.jpg", 385, 320 )
fullpuz[1].xReference = fullpuzxref[1]
fullpuz[1].yReference = fullpuzyref[1]
fullpuz[1]:setMask( piecesmask[1] )
fullpuz[1].isHitTestMasked = true
fullpuz[1].xScale = piecescale
fullpuz[1].yScale = piecescale
fullpuz[1].picked = false
Again, no lag in simulator or iPhones (the two I have to test on at least), but on both iPad 3 and 1.
It definitely could be related to something else in my code, but I would expect to see lag on the 3gs if this was the case.
Thanks so much for your help guys!
Scott [import]uid: 79834 topic_id: 33484 reply_id: 133250[/import]