Ok so here the plan I want to populate a game full of trees but to manage Z order correctly between players and trees is madness. So I've figured that it would be far easier to move the trees away from each other so that I do not run into issue like being in-front of a tree when its suppose to be behind and etc.
So for this little game i have a 9 patch being use for the stalk of the tree to randomly generate different height without losing graphic issues. next I am using a invisible sprite with all the image point because i want the limbs and such to be the same height n width. but just on different height in scaled according to the tree height. That part i got it perfected. I even got a collision helper box at the base of the tree to help with the player Z order as in when to be in-front of the tree and behind the tree.
My problem is that I want to randomized the location of these ten trees and to not overlap each other. so in otherword I want to sort a lock the tree that are not overlapping so that the newer tree that get created that are overlapping to move somewhere else to fill in the space of the void.
problem is that i do not know how to implement such system for such creation.
I think it has to do something with a picking system but is there such a system where i can repick and recheck each ones but leaving other to lock cause i almost had it down but it infinity move the trees around so.....how do I lock each tree but keep moving the overlapping new tree around to a new space away from the tree . Or i could just simply Oppacity the tree to 0 when two are there to avoid the issue but id rather not.
here the pictures of what im talking about