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 / collision frustration

Author
Message
Stormbringer
22
Years of Service
User Offline
Joined: 1st Oct 2003
Location:
Posted: 15th Nov 2003 23:32
for over a week now i've been trying to get some functional collision going with some medicore results.Static can't even get it to function period(the coding i've seen on what very few demos ive seen that use it make no sence;the room demo useing templates.) then i switched to boxes works fine until i get to an area like corners where the boxes touch and my vehicle passes through it.Decided to but diagonal walls in the corner to block this out making the room more like an octigon in shape. Problem collision boxes dont move diagonally with wall. Okay tolerable except same problem, corners of collision that touch or are close enough together that the vehicle touches 2 boxes simultaneously ,bam the vehichle passes through the wall .

questions
1- how do you create a room with FUNCTIONING wall collision without leaks in the corners
2- if static is the only way to do it how does it even work
3- if i can use box for sliding how do i stop the corners from creating leaks
4- is there anyway to create collision on diagonal walls or cant you do this with darkbasic

Im useing DBP with no patches and using DBP for creating all wall models , vehicles are from darkmatter.
nuclear glory
22
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 16th Nov 2003 01:02 Edited at: 16th Nov 2003 01:04
I highly recommend using the DLL we designed to handle collision.

It doesn't have "box-2-mesh" collision but it DOES have "ellipsoid-2-mesh" collision. And it'll work at any speed and at any angle.

It may be difficult to use for your box shaped object, so some ingenuity would have to be applied. Box-2-mesh collision will be released for the DLL at a future date.

Lead Programmer/Director
Powerful Collision DLL for DBPro: http://www.nuclearglory.com
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 16th Nov 2003 02:17
intersect object is your friend. Only he mumbles a lot and is hard to understand. I had a demo for it on my site but my team are moving web host at the moment so it is down, in a few days, check out my programmers resource at www.bansheestudios.com.

=Intersect Object(objectNo,sx,sy,sz,dx,dy,dz)

where objNo is object to test against. sx/sy/sz are a 3d position in space. dx/dy/dz is a 3d position in space. An imaginary line is drawn between these two points and the result is...

0 no collision
>0 collided. Position of collision: range between points-result of intersect object command.

To make sliding collision with this check out my resource when it gets back online for a demonstration. It is very simple to use and it is written in DBPro so you can take it apart and learn for yourself.

Or use nuclearglory.dll


God created the world in 7 days, but we're still waiting for the patch.
Carlitos
23
Years of Service
User Offline
Joined: 8th Jul 2003
Location: United States
Posted: 16th Nov 2003 02:36
Go to code snippets and do a search for "SLIDING COLLISION MADE EASY" and just copy paste, or you could use the nuclearglory .DLL which I also highly recommend. I'd probably go for the .DLL so that you can use it for any program.
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 16th Nov 2003 02:38
Quote: "Im useing DBP with no patches"


Is there a reason for this? - I strongly suggest that you update to the latest version.


BLUE GUI Plugin: http://blue.robert-knight.net / BLUE IDE [href]http://blueide.sf.net/ - Replacement editor for DBPro[/href]
cycloid gamma
23
Years of Service
User Offline
Joined: 20th Feb 2003
Location:
Posted: 18th Nov 2003 06:17
Nuclearglory rocks but i get a considerable hit in my framerate.
nuclear glory
22
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 18th Nov 2003 06:43 Edited at: 18th Nov 2003 06:47
@cycloid gamma
Could you possibly tell me the specs of your environment?

Such as:
Polygons in level
Number of ellipsoids
Methods of collision


The current release on the site (2.00) was more of a pre-test release and lacked some optimizations. For the upcoming release (2.01) we tested 2 ellipsoids against a 7000 polygon mesh and the framerate went from 14-16 fps (without collision) to 13-14 fps (with collision)

Also, in the upcoming release, if your level is broken down into chunks of say 800 polys or less per chunk. And each chunk is a separate object, it'd allow the collision system to quickly ignore entire chunks that are out of range and get a significant speed boost.

If you could provide feedback to me regarding the speed of the newer version (once it's released) I'd greatly appreciate it.

We do have some ideas that may greatly increase speed for even large meshes. I'll keep you posted on progress.

Lead Programmer/Director
Powerful Collision DLL for DBPro: http://www.nuclearglory.com
nuclear glory
22
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 18th Nov 2003 07:12
After some testing, I'm not seeing a terrible performance hit. If your mesh consists of thousands of polygons then the performance hit would increase with the size of the mesh. Usually these meshes are in excess of 10,000 polygons that cause a large hit on performance.

Lead Programmer/Director
Powerful Collision DLL for DBPro: http://www.nuclearglory.com
zircher
23
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 19th Nov 2003 04:19
Quote: "Also, in the upcoming release, if your level is broken down into chunks of say 800 polys or less per chunk. And each chunk is a separate object, it'd allow the collision system to quickly ignore entire chunks that are out of range and get a significant speed boost."


[insert happy dance]

I've got a tile based track editor that is just dying for that functionality.
--
TAZ

Login to post a reply

Server time is: 2026-07-26 20:16:44
Your offset time is: 2026-07-26 20:16:44