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 Discussion / Collision Slowing Down

Author
Message
Yoshiman1
21
Years of Service
User Offline
Joined: 12th May 2004
Location:
Posted: 11th Dec 2004 08:23
I have 2 objects, and I set one of them to boxes and another to polygons, or whatever.

If atleast one of the object's collisions are set to polygon, the framerate will slow down enormously.

Yet once none of them have polygon collision, the framerate is fine.

Anyway to increase the framerate with having polygon collision, other than "GET A NEW COMPUTER, DIPWAD" or something like that?
hexGEAR
22
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 11th Dec 2004 11:57
If framerate is a problem don't use polygon collision detection, dark basic has to check each and every triangle on your object for collision as opposed to checking just 12 triangles for a box collision.

As digital suggested you can use spherical maths to find the distance between two objects to determine if they collide or not, or you could stick with creating a collision box for each object.

If you really must use polygon collision then don't check for collision until both objects are within some distance of each other.

Login to post a reply

Server time is: 2025-05-24 08:29:04
Your offset time is: 2025-05-24 08:29:04