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

Re: [pygame] Collision handling algorithm



That's similar to what I do in Simpleton.  I run the colliding pairs
through a test loop, and collisions call a collide() function that
checks an internal dictionary of qualities.  So, collision object 1
says, "I'm a LASER and I am HOT".  Collision object 2 compares LASER
and HOT against it's collision dictionary.  If it has a key, then it
runs a quick line of embedded script, and if it doesn't, then it
disregards that quality.

So, I really like your idea, but it's possible to abstract collisions
even further.

-- 
Andrew Ulysses Baker
"failrate"