View Single Post
Old 23 May 2015, 18:38   #137
NorthWay
Registered User
 
Join Date: May 2013
Location: Grimstad / Norway
Posts: 392
Quote:
Originally Posted by TMR View Post
the processing power isn't really there to "brute force" the job with a bubble sort.
Agree to disagree?

If you look at it, objects stay relatively relative to each other from frame to frame, and data that is mostly sorted is exactly what bubblesort loves.
If you are careful with your code and try to not add in more than one object every frame then one or two runs of cocktailsort should keep you sorted, and if you can also let your multiplexing splitter just drop sprites that are in the wrong order then you should have minimal blinking.

You are after all doing at least 50 passes over the sorting data each second ensuring you have mostly sorted data since your objects move smoothly across the screen.
NorthWay is offline  
 
Page generated in 0.07443 seconds with 9 queries