OlaOst/spacegame — Issue #37: Hardcoded collision response
Author: OlaOst
Created: 2011-10-11 22:13:19+00:00
State: open

Collision response should be moved out of the code.
Define a collision response in a data file with two CollisonTypes as the key, something like this:
(Bullet/NpcShip).spawn = horribleCollisionSound.wav
(Bullet/NpcShip).Bullet = destroy
(Bullet/NpcShip).NpcShip = reduce health by collisionforce * 0.5ish

(ok the key = value data format is creaking at the seams here, but for now maybe we just want to spawn sounds and particles in the collision response data files, and let D code handle modification of values like lifetime and health)

The collision system groups its components by collision type and only checks for collisions between types that have a collision response defined