On Tue, 07 Dec 2010 00:53:27 -0800
John Nagle <na...@animats.com> wrote:

> On 12/5/2010 2:49 PM, Martin Manns wrote:
>     Probably because you seem to be trying to compute the intersection
> point for coincident lines, which is not well-defined.

I found the problem: 
pygame returns one pixel more for the right border than wx.

>     Incidentally, a dictionary lookup in Python is far more expensive
> than computing trig functions.  If you need to speed this up
> for large numbers of rectangles, there are algorithms that are
> several orders of magnitude faster.  Realistically, though,
> this is the kind of problem that runs slow in CPython.

This was taken from the vizier code. I fixed it.

>     This is why you don't write your own collision library.
> (I once did, for 3D, but that was in 1996, when it was
> cutting-edge technology.)

Is there a pure Python collision library other than vizier?

Martin
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to