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.

DarkBASIC Professional Discussion / Struggling with DBpro collision detection

Author
Message
Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 2nd Aug 2003 08:28
I found that DBpro collision detection functions only work best only if your 3-D model does not have complicated shape, i.e. box and sphere will be the best. The documentation said that it will create a bounding box/sphere for each limbs in the object, but I found that there is only a SINGLE bounding box/sphere around the object, which makes the collision detection very inaccurate. It is still tolerable if it works as stated in the help file.

I would appreciate it if someone correct me if I am wrong, as I am still learning it though, and I might miss some details.

Any tips on on collision detection in DBpro will be much appreciated as well. I am creating sort of like combat jet flight sim. Thus, basically those indoor collision detection won't work for me. As the objects can freely move at any direction and rotate on any axis, I think what I need is a collision detection on object basis, which is considerably accurate, i.e. I don't want a missle fly beneath the wingspan but still calculated as colliding with the ship.

Besides, anyone have any idea how to reduce the number of calls to collision detection functions? Assumed that I am doing collision detection on object to object basis, if I have n objects in the world, I need to do roughly n squared times of collision detection. The only optimization way that I thought of is split the world into regions, and only perform collision detection on the objects in the same region.

Any ideas? Thanks!
Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 2nd Aug 2003 08:43
I can answer one part to your question.

Its to do with reducing the amount of collision calls per loop or having none at all

Using a distance function you can calcualte the distance between two objects and only then do the collision detection. saving tonnes of checks per loop and reducing it to as many as you want within a given range of the players object. etc...

this really improves performance and if your not requiring an absolute collision detection for say a limbed model but just the distance of two objects then this puppy is the key. It works prior to detecting collision using other limb collision based methods i wont talk about here to keep this part simple and clear.
I dont know enough about limb based collisions yet but making mini limbs within an object and glueing real objects to these limbs provides a solution to check the collision ont he glued object and allows for more options since a limb doesnt have as many filters and features of a normal meshed object.





theres a few distance functions around and this one might be faster than the last, dont forget if its a 2d based fighting area in a 3d world u can allevaite another call from the distance checks. assuming y for everyone inthe game is equal or very close so they can still come in a distance measured.

heres another distance function



Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 2nd Aug 2003 12:39
Thanks Indi, I appreciate your help, although I am aware of those techniques. Right now, what I need to research is a more accurate limb based collision detection mechansim.

Keep my fingers crossed.

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
The admiral
23
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 3rd Aug 2003 01:41
Im sure eventually the darkbasic proffesional collision system will be upgraded in one of the upgrades but right now you have to wait or make a dll to do good collision.

[href]www.vapournet.com/~flyer[/href]

Login to post a reply

Server time is: 2026-07-22 10:04:54
Your offset time is: 2026-07-22 10:04:54