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

Re: [pygame] Geometry engine



On Saturday 02 September 2006 03:03, Ethan Glasser-Camp wrote:
> Last night I posted to the cookbook my geometry engine. It uses
> Numeric as suggested a few weeks ago to combine math to whatever
> degree possible. It's still not as fast as I would like it, and the
> part that checks for collision between round and polygonal objects is
> still very ugly. I'd like to hear any advice or criticism you have.

Thanks for submitting it. There's probably some overlap with Alex's recent 
euclid module?

http://www.partiallydisassembled.net/euclid.html


> Known defects:
> - littered with commented-out print statements, which are the proof
> that I was debugging the crap out of this thing

I cleaned most (if not all) of those out of the code when I also edited it for 
readability:

- wrapped the code so it was a reasonable width (if the code is wider
  than the textarea box then it'll push out the width of the resultant
  page too much, and will also be harder for casual reading)
- put a space after the comment chars (as per PEP 8)
  http://www.python.org/dev/peps/pep-0008/

(I perform these edits for all submissions to the CookBook that need them)


    Richard