Hi!
Let’s say that I have 2D game where I have nice forest which consists of trees (surprise). Every tree would be object and added there using linkedlist or some other nice collection. If those objects are not sorted correctly then it looks like tree behind other tree is rendered in front of the other tree and that looks terrible. I think solution is to sort trees based on their y-values but I cannot get it work.
Is there any simple way to do this?