There's a lot of experienced people on here, so I thought I'd pick your brains as to the best technique to use for my upcoming sprite collision. Its an all 2D game, using Blitz3D (thats the package I bought)
I need to detect a collision on each side of a sprite so I can write a routine for it to react correctly. eg. if the sprite is hit on the left side, its pushed right, etc...
What I'd like to know is which technique to use. I haven't done this before, so the options I've worked out so far are...
a) I can use a simple 'overlap' detection along with the fact that I know each sprites direction (degrees) and speed so I can calculate a 'reaction'
b) For each sprite frame, I could have a corresponding collision frame which is colour coded on the sides. I could use a Blitz command like ReadPixelFast to work out which colour is in collision and therefore which side.
c) For each sprite frame, I could have FOUR corresponding frames - each representing a side eg. top, bottom, left & right. I could perform a simple 'overlap detection' on the appropriate frame.
Any help would be appreciated
I need to detect a collision on each side of a sprite so I can write a routine for it to react correctly. eg. if the sprite is hit on the left side, its pushed right, etc...
What I'd like to know is which technique to use. I haven't done this before, so the options I've worked out so far are...
a) I can use a simple 'overlap' detection along with the fact that I know each sprites direction (degrees) and speed so I can calculate a 'reaction'
b) For each sprite frame, I could have a corresponding collision frame which is colour coded on the sides. I could use a Blitz command like ReadPixelFast to work out which colour is in collision and therefore which side.
c) For each sprite frame, I could have FOUR corresponding frames - each representing a side eg. top, bottom, left & right. I could perform a simple 'overlap detection' on the appropriate frame.
Any help would be appreciated