Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My Stupid Casual Programming Problems
#5
So far, I haven't been working with C++, but I am quite sure that there is a sort-algorithm implemented (I'd be disappointed if it's not). So, sort LOADED.ON_SCREEN_OBJS according to their posz-value, then iterate over these objects and draw them. Even if you have backup your array (i.e. create a key-value-list where key=object-num and value=posz) before sorting, this should take n + n*log n + n operations (n=number of objects) in total.
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by: A-Man


Messages In This Thread
My Stupid Casual Programming Problems - by A-Man - 03-15-2014, 08:25 AM
Render z-wise algorithm. HELP! - by A-Man - 05-31-2014, 07:23 AM
RE: My Stupid Casual Programming Problems - by Silverthorn - 05-31-2014, 08:03 AM



Users browsing this thread: 1 Guest(s)