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 dll - too much collisions or am i doing wrong?

Author
Message
Sjakie
21
Years of Service
User Offline
Joined: 17th Dec 2003
Location: Netherlands - Delft
Posted: 9th Feb 2004 21:14
Hey guys

I'm building a FPS/ADVENTURE combo. You are a guy that walk in a huge castle (12000 polygons). The Collision dll of NG (www.nuclearglory.com) handles all the collision work... Works awesome. Now im putting some enemy's (2) in the game, and BANG!, fps drops from 45 to 16! Is there a way to make the collision quicker, or is my castle too detailed (i hope not)???

Juzt a dude who likez progging - Me loves RTS games
nuclear glory
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 9th Feb 2004 21:40
The problem is the castle is one giant object. And for each of the ellipsoids being tested against it, it has to scan across each of those 12,000 polys.

So, looking at the numbers:

1 ellip : 12,000 scans (per frame)
2 ellips: 24,000 scans (per frame)
3 ellips: 36,000 scans (per frame)

To increase the performance of the system, divide your castle into chunks. If each chunk was 500 polygons or less, it'd drive the performance way up. And our new scan list would look similar to this:

1 ellip : 500 scans (per frame)
2 ellips: 1000 scans (per frame)
3 ellips: 1500 scans (per frame)

In short, that's 1500-3000 scans (per frame) compared to 36,000 scans (per frame). That makes an enormous difference in speed.

The collision system will skip the chunks out of range, so that is why you would get the massive performance increase as shown above.

Lead Programmer/Director
Powerful Collision DLL for DBPro and DBC: http://www.nuclearglory.com
Sjakie
21
Years of Service
User Offline
Joined: 17th Dec 2003
Location: Netherlands - Delft
Posted: 10th Feb 2004 15:55
So i just need to divide my object into smaller pieces? Or can i use limbs?

Juzt a dude who likez progging - Me loves RTS games
nuclear glory
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 10th Feb 2004 18:45
It needs to be separate pieces that you load into the collision system separately.

Lead Programmer/Director
Powerful Collision DLL for DBPro and DBC: http://www.nuclearglory.com
Sjakie
21
Years of Service
User Offline
Joined: 17th Dec 2003
Location: Netherlands - Delft
Posted: 10th Feb 2004 20:20
Ok i tried that... but each object is stored in a memblock... do i need to get them all in 1 memblock (if yes... HOW???) or what? I'm really getting confused about this.

Juzt a dude who likez progging - Me loves RTS games
nuclear glory
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 10th Feb 2004 21:53
The collision system works directly from DB objects to keep track of where everything is at. You need each chunk to be a separate DB object (IE: Each chunk is it's own externally loaded .X model) then you load up each chunk separately in a loop, and after you load each one you pass it to the collision system:

CollisionTypePRO( myChunkObj, WORLD_MESH )

Lead Programmer/Director
Powerful Collision DLL for DBPro and DBC: http://www.nuclearglory.com
Sjakie
21
Years of Service
User Offline
Joined: 17th Dec 2003
Location: Netherlands - Delft
Posted: 10th Feb 2004 22:53 Edited at: 10th Feb 2004 22:55
Hmmm... yeah in theory, it looks good... but ehm... im using the v1.5 dll (because its 4 dbc AND free!) , and when i use the command, DB says NO SUCH ARRAY DIMENSION or UNKNOWN COMMAND. The dll works with call dll(1,command), so is it possible to use the same command with call dll?? there is no online guide of it, maybe you should make one

Juzt a dude who likez progging - Me loves RTS games
nuclear glory
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 10th Feb 2004 23:48
Okay, you're using the 1.5 version. The 1.5 version can only load a single model and the model cannot be re-positioned or anything.

The 1.5 version was the 2nd release of the system where any sliding collision at all in DBC was big news. It does not contain any of the features/enhancements that the current release has.

That would also explain why my instructions above didn't make any sense to you, lol.

You're out of luck with the 1.5 version. You'll have to make the castle less complex. Or you could purchase the commercial version.

All the best.

Lead Programmer/Director
Powerful Collision DLL for DBPro and DBC: http://www.nuclearglory.com

Login to post a reply

Server time is: 2025-05-22 17:00:39
Your offset time is: 2025-05-22 17:00:39