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

Re: [pygame] Collision handling algorithm



I can't find the article right now, but there's an interesting interview online regarding "Deus Ex," "Morrowind," "System Shock," and emergent behavior in video games. The point of it is, you seem to be on the right track by giving generic traits to events like explosions and laser blasts, letting objects access each others' data instead of having every type of collision hard-coded. If an exploion is only coded as "hurt the player if they're nearby," that works, but if it's coded instead as "create an Explosion object that damages anything nearby," you can get cool, surprising gameplay like players trying to get enemies to clump together before destroying one, creating a chain-reaction of destruction. It's like a collectible card game: if you divide cards into general categories with rules like "Affects anything made of glass," you can easily add new content and have it automatically work with existing content.

Kris