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.

2D All the way! / Question about collision detection

Author
Message
Orient
15
Years of Service
User Offline
Joined: 2nd Aug 2008
Location:
Posted: 7th Aug 2008 16:30
Hi, and sorry to fill the forum with nub posts. I'm currently working on learning the basics (in DarkGDK), starting with sprites and 2D programming. I'm at the point now where I need to figure out collision detection.. how do I do it? I recall reading a post implying that there was some type of detection system built into DarkGDK. If that is the case, how do you use it?

Anyway, code snippets or links to a tutorial would be greatly appreciated, and that you all for your help so far!
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 8th Aug 2008 19:42
Have a look at dbSpriteHit() and dbSpriteCollision(). Of course, these are valid for testing if the rectangular area of a sprite intersect. If you're looking for pixel perfect collision you'll need to do your own programming.

You might be interested in taking a look at the Dark GDK forum. I believe there was a discussion regarding this a while back.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office

Login to post a reply

Server time is: 2024-05-02 21:18:00
Your offset time is: 2024-05-02 21:18:00