road0001 / as3isolib

Automatically exported from code.google.com/p/as3isolib
0 stars 0 forks source link

DepthSorting performance #28

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I'm running to an issue where when I have 2500 actor on a grid of 50x50, the 
depth sorting is really slow to execute.

Have you worked on that?

Original issue reported on code.google.com by jfdesga...@gmail.com on 10 Jun 2010 at 8:36

GoogleCodeExporter commented 8 years ago
i've looked into DefaultSceneLayoutRenderer and found that the depth sorting 
loop is a O(n^2). i don't have any better solution on sorting yet but simply 
exclude those which are not visible (i.e. out of the view). Unless your screen 
size is very large and you are sorting frequently, the engine can run smoothly.

Original comment by patrick....@gmail.com on 2 Sep 2011 at 9:41

GoogleCodeExporter commented 8 years ago
Hi, I recently came up with this O(nlgn) algorithm 
http://qbolec-memdump.blogspot.com/2013/12/new-world-order-sorting-tiles-in-on-l
g-n.html and would love to implement it for your library, but I do not know 
where to start yet (as I have no AS3 nor Flash background :/). 

Original comment by qbo...@gmail.com on 18 Dec 2013 at 9:21