Hi Rob,
Thanks for the update, even knowing that it may be looked into is good to hear.
I want to emphasize the problem here, there are two constants at the top:
local OBJECT\_COUNT = 2000; -- \<\< I changed this to 1500 in more recent tests of my own local DEMONSTRATE\_BUG = true;
With my finger on the screen making very fast circles:
- Setting DEMONSTRATE_BUG = false will cause the scene to run very quickly.
- With local DEMONSTRATE_BUG = true , the scene will run very poorly
The difference between the settings is that TRUE will create a random (and deep) hierarchy of display objects, and FALSE will create a flattened list of display objects in the “global” stage.
I tried the suggestion from @scottrules44, wherein I added this code to the MAIN.lua:
local background = display.newRect(display.contentCenterX, display.contentCenterY, display.contentWidth, display.contentHeight); background.alpha = 0.1; background:addEventListener("touch", function () return true end);
This seems to make logical sense, in that since “background” is on top of the display list, it should receive the first touch event, and since it always returns true, propagation to the rest of the display list is canceled.
I’ve even tried adding the listener to the Runtime global, and I’ve tried sending “background” to the back of the list to check if Corona was iterating the list backwards or forewards.
-- In case Corona iterates the Display List back-to-front local background = display.newRect(display.contentCenterX, display.contentCenterY, display.contentWidth, display.contentHeight); background.alpha = 0.1; background:addEventListener("touch", function () return true end); background:toBack(); -- In case Corona iterates front-to-back local foreground = display.newRect(display.contentCenterX, display.contentCenterY, display.contentWidth, display.contentHeight); foreground.alpha = 0.1; foreground:addEventListener("touch", function () return true end); -- Try to stop it at the system level Runtime:addEventListener("touch", function () return true; end);
In all cases, I receive frame rate drops when DEMONSTRATE_BUG = true.
On my HTC Rezound (http://www.gsmarena.com/htc_rezound-4099.php):
DEMONSTRATE_BUG = true:
–Idle: 30-33 fps
–Touching: 15-18 fps
DEMONSTRATE_BUG = false:
–Idle: 30-33 fps
–Touching: 26-27 fps
On my BLU DASH JR (http://www.gsmarena.com/blu_dash_jr-5662.php)
DEMONSTRATE_BUG = true:
–Idle: 59-60 fps
–Touching: 54-59 fps
DEMONSTRATE_BUG = false:
–Idle: 59-60 fps
–Touching: 45 fps
Thanks again,
Albert