|
|
Atari demoscene BBS
| Re: Collision detection |
|
Posted by: Patrice Mandin
|
Jul,30.2004-17:21
|
Here is the theory about collision detection:
- Check if bouding boxes of the 2 sprites you want to test have an intersection zone or not.
- In this case, do a AND between the 2 sprites, by taking in account only the pixels in the intersection zone, for both sprites (you need to use the sprite's mask).
With the blitter, I copy the intersection zone of the sprite 1 in a buffer, then ANDing the intersection zone of sprite 2 with this buffer.
- Then, check if the resulting value has zeroes for all bits (no collision) or not (collision!).
With the blitter, I do an OR with the result of the previous operation for all sources words, in a unique destination word, then just check if this word is zero or not.
|
[All messages in this thread] [Start new thread]
|
Topic
|
Posted by
|
Date
|
|
Collision detection
|
Bod/STAX
|
Jul,29.2004-19:27
|
|
Re: Collision detection
|
Bod/STAX
|
Jul,29.2004-19:28
|
|
Re: Collision detection
|
ray
|
Jul,29.2004-20:01
|
|
Re: Collision detection
|
Patrice Mandin
|
Jul,30.2004-17:21
|
|
Re: Collision detection
|
Patrice Mandin
|
Jul,29.2004-20:40
|
|
Re: Collision detection
|
Bod/STAX
|
Jul,29.2004-21:00
|
|
Re: Collision detection
|
Bod/STAX
|
Jul,29.2004-21:11
|
|
Re: Collision detection
|
Patrice Mandin
|
Jul,30.2004-10:57
|
|
Re: Collision detection
|
Bod/STAX
|
Jul,30.2004-13:07
|
|
Re: Collision detection
|
gwem
|
Jul,30.2004-13:20
|
What's the anti-troll code? That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
|