| 
  | 
Xplo Eristotle wrote:
> Because of the random nature of the code and the need to test against 
> every other tree when placing a new one,
Sounds like you may be just running linearly through your array when 
trying to place a new tree. Inserting the tree in order, then finding 
the trees to test against via binary search might work better.
For example, order by X axis, do a binary search, and only compare with 
trees within a certain distance of the same X.
Or, if you can fit (say) 20 across and 20 high, make a 20x20 array and 
only check the nearby cells for possible trees.
-- 
Darren New, San Diego CA USA (PST)
   I am in geosynchronous orbit, supported by
   a quantum photon exchange drive....
 
 Post a reply to this message 
 | 
  |