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

Re: [pygame] Fastest (x,y) distance calculation



First off, thanks to everyone for their suggestions! I'm still looking
into how I want to optimize this stuff.

> I'd personally just go
> for the BSP (maybe something more hash-like might be more appropriate
> in pure python?) at this point, because the other two have some fringe
> cases that probably aren't worth dealing with.
>
> -bob

I investigated BSP trees, but it looks like it would be difficult to
maintain them on the fly for a large number of moving objects. For the
static Temples, it's no problem. But I eventually want to have up to 100
(or more, if I can optimize properly) moving objects that each know who
the nearest object is.

Or are BSP trees the way to go?

---
Zak Arntson
www.harlekin-maus.com - Games - Lots of 'em