From: Hassan Schroeder Date: 2010-03-15T01:24:14+09:00 Subject: Re: Newbie Help : Object On Sun, Mar 14, 2010 at 9:09 AM, Ian Hobson wrote: >> Have each Ball continuously register its location (x,y) with a single >> Observer object; an attempt to register to an occupied location can >> be handled however you want -- throw an exception, send the Ball >> a message to reverse direction, vaporize the Ball, etc. > The observer object will have to do the same (computationally explosive) > work to detect that the currently registering ball does not collide with any > of the others. Each must be tested against the others, every time it moves, > so this simply hides the calculations. Sorry, I don't see that at all. If every point on the surface maps to a data structure that holds the identifier of the object that occupies it, it's a simple comparison to determine if a given point is occupied or not. -- Hassan Schroeder ------------------------ hassan.schroeder@gmail.com twitter: @hassan