By just creating more than 1000 objects. This can be a circle, a rect or an image.
Try this examples with a FPS script. On my ipad, the FPS drops down from 30 to 10.
Example 1
for i = 0, 35 do
for j = 0, 35 do
local circle = display.newCircle( 4, 4, 8 ) -- or display.newImage( "circle.png" )
circle.x = i\*16
circle.y = j\*16
end
end
Example 2 - Paint till you get a low FPS
local function drawCircle( event )
local phase = event.phase
if phase == "began" or phase == "moved" then
local circle = display.newCircle( 4, 4, 8 ) -- or display.newImage( "circle.png" )
circle.x = event.x
circle.y = event.y
end
end
Runtime:addEventListener( "touch", drawCircle )
FPS script:
http://developer.anscamobile.com/code/output-fps-and-texture-memory-usage-your-app
A year ago, this problem was already known:
http://developer.anscamobile.com/forum/2011/03/26/batch-rendering
I think it has something to do with Corona and OpenGL. Other engines can draw 1000 times the same object, without losing much performance. [import]uid: 10863 topic_id: 25561 reply_id: 103337[/import]