Hey Everyone,
I have a question I have created a 50x50 map using images that I have put into a display group. When I drag and move the group is seems to be much slower than it should? I am aware the this is 2500 images but I assumed putting all of the image into a display container and moving that container would have no performance issues at all not matter the size of my map.
Do you have any suggestions to improve this? Here is the code I am using to move the group.
function group:touch( event )
if event.phase == “began” then
self.markX = self.x – store x location of object
self.markY = self.y – store y location of object
elseif event.phase == “moved” then
local x = (event.x - event.xStart) + self.markX
local y = (event.y - event.yStart) + self.markY
self.x, self.y = x, y – move object based on calculations above
end
return true
end
group:addEventListener( “touch”, group )