Re: Presentation & Question

On Mon, 2002-03-11 at 05:52, Lucas Di Pentima wrote:
> Well, generally there's 500 planets and 500 ships in a 2000x2000 canvas.
> Now I'm figuring out a quick method to calculate distances. Thanks!!

Probably you want to look at bounding rectangles or something so as
to cut down the number of planets and ships you need to check. You
might be able to get some value out of storing the planets and ships
in some kind of tree structure based on their position so you could
efficiently search for the "approximately closest" group.

Have a look at this article on collision detection. It's aimed at 3D
realtime games but your problem ends up being a special case of what
they're talking about. And the simple optimizations they talk about
should be easy to apply to the 2d case.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]