Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Hit or Collide

Author
Message
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 30th Apr 2008 22:38
Does anyone know the difference, if any, betweeen dbSpriteHit() and dbSpriteCollision()? The former uses terminology of "impacting" whereas the latter reports if sprites overlap.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Core2uu
16
Years of Service
User Offline
Joined: 15th Mar 2008
Location: Saskatoon, SK, Canada
Posted: 1st May 2008 04:03
Another addition to that question if I may:

What is the difference between dbObjectHit and dbObjectCollision?

~~It's not who you are underneath, but what you do that defines you.~~
Carlos
20
Years of Service
User Offline
Joined: 26th Mar 2004
Location:
Posted: 1st May 2008 08:22
For my understanding, Hit means it only checks the moment when two objects impact/collide to each other. After that, if the two objects are overlapping, Hit return 0.

Collision means it will check whether two objects are overlapping to each other. It will return a positive integer while two objects are still overlapping.
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 1st May 2008 17:08
Oshhhhh! That's going to take some thinking then.

Thanks.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Core2uu
16
Years of Service
User Offline
Joined: 15th Mar 2008
Location: Saskatoon, SK, Canada
Posted: 2nd May 2008 00:30
The function of dbObjectHit could prove quite useful in some instances then...

Wait so tell me if I have this right... dbObjectHit will return 1 when the two objects FIRST collide in the loop... The next loop it will return 0 even though the two are still overlapping... When they are no longer overlapping dbObjectHit "resets" and then will return 1 if they overlap again... and then it loops over again... Is that somewhat correct?

~~It's not who you are underneath, but what you do that defines you.~~

Login to post a reply

Server time is: 2024-11-17 12:57:59
Your offset time is: 2024-11-17 12:57:59