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

Re: [pygame] Some particle system insights



> As my friend Kodos from the Simpsons says, "Holy Flurking Schmit!"
> That's even faster than set_at, and it will maintain its speed on
> hardware video surfaces. I'd forgotten about fill. I'm sold.

sounds like Surface.set_at should just be calling SDL_FillRect
instead of trying to do its own homebrew pixel twiddling. the
unfortunate
side effect of this would be that set_at() requires unlocked surfaces
and get_at() requires locked surfaces. hmmm?



> What I was looking for was actually the opposite - collide a single
> point vs. a list of rects. It looks like fill is the way to draw fast
> 1x1 squares while maintaining the rect advantages, so this isn't that
> important to me anymore.

well, it would be easy to write another module, "pygame.point" that
could perform some operations on any pair of integers? this would be
more like a C interface than object oriented, but i can't think of
too many functions that would be in there? it could likely be done
with straight python code (at least for now?)

i'll do it if anyone has a need for it, until then i think we're a
little
cleaner without it.
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org