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.

Program Announcements / DBP/DBC Collision DLL - FREE

Author
Message
Paul Johnston
TGC Developer
14
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 5th May 2004 21:33 Edited at: 21st Mar 2006 19:04
Allows you to do DBPro style 'intersect object()' collisions, returning both position and collision normal, in DBPro or DBC.

DB Classic:
New Version: http://sparky152.homestead.com/files/DBCcollisions_v1.05.zip

DB Pro:
New Version: http://sparky152.homestead.com/files/DBPcollisions_v1.08b.zip (21st Aug)
Also supports terrain, example:
http://sparky152.homestead.com/files/TerrainDemo.zip

Edit: Version 2.0 for DBP has now been released, you can find it here: http://forum.thegamecreators.com/?m=forum_view&t=74762&b=5

enjoy

Surreal Studio IanG
13
Years of Service
User Offline
Joined: 21st Sep 2003
Location: Cyberspace...I think
Posted: 5th May 2004 21:45
looks good if it does what it says on the tin

*Downloading now*

PC Spec- AMD Duron 1.3Ghz, GeForce FX5200 128mb, 384MB of ram, Win XP Home SP1

Flick that switch...*BANG*...Not that one!
hexGEAR
14
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 5th May 2004 21:49
cool, hey sparky are u in warwickshire?

Surreal Studio IanG
13
Years of Service
User Offline
Joined: 21st Sep 2003
Location: Cyberspace...I think
Posted: 5th May 2004 21:51
looks good - ill try it more in depth later on but from what i've seen it looks like it's what i've spent ages looking for.

PC Spec- AMD Duron 1.3Ghz, GeForce FX5200 128mb, 384MB of ram, Win XP Home SP1

Flick that switch...*BANG*...Not that one!
Paul Johnston
TGC Developer
14
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 5th May 2004 21:53 Edited at: 5th May 2004 21:57
indeed I am, Leamington spa, how did you know?

@phoenix: glad I could help.
hexGEAR
14
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 5th May 2004 21:59
i'm the great houdini... nah, just joking you may not remember me but we met on the old db msn chat rooms, at least i think your the sparky i met... you got an e-mail add or msn messenger ID? i need to talk to you about something.

Paul Johnston
TGC Developer
14
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 5th May 2004 22:09
@Hexgear: check your mail.
Trev
13
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Canada, Ontario
Posted: 6th May 2004 15:38
hmmm intresting a free collisoin dll.....will this put nuclear glory out of bisness? lol even if it does we all made em rich all ready lol.

Trevor Somerville Making the best game Beast Hunter. So what if it dosn't have any sound or enemies yet....
Paul Johnston
TGC Developer
14
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 6th May 2004 18:46
lol, no it doesn't do anything near what nuclear glory collision system can do, it's just a replacement for DBpro's intersect object command, returning useful information like object hit and collision normal, whilst being faster as well.
Also DBC doesn't have anything like this at all so I thought it might be useful to some people to have this type of accurate collision in DBC.
Mussi
14
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 6th May 2004 22:00 Edited at: 6th May 2004 22:01
I assume it doesn't works on moving objects?
nice job , I could release mine to now ^^



Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 80GB HD 7200rmp U133, Geforce 4 Ti4400 128mb
Surreal Studio IanG
13
Years of Service
User Offline
Joined: 21st Sep 2003
Location: Cyberspace...I think
Posted: 6th May 2004 22:05
Sparky - could you add a ray cast to it? please


*off-topic:- i've just noticed you can shorten my forum name to p*ss - lol*

PC Spec- AMD Duron 1.3Ghz, GeForce FX5200 128mb, 384MB of ram, Win XP Home SP1

Flick that switch...*BANG*...Not that one!
Paul Johnston
TGC Developer
14
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 6th May 2004 22:39 Edited at: 6th May 2004 22:53
@phoenix: speak to you on msn.
eat much pie
13
Years of Service
User Offline
Joined: 9th Apr 2004
Location: Within the mind of a lowly mortal...
Posted: 3rd Jun 2004 00:50
Hey sparky! Great DLL. Can I use it in a commercial program please?

http://www.nuclearglory.com/?i=453288050 : Nuclear Glory, AMAZING COLLISION SYSTEM!
BatVink
Moderator
14
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 3rd Jun 2004 01:45
Eat Much Pie, you may be eating humble pie if you're not careful. The last person to try and make money from NGs DLL here has now left after being consumed by flames.

We all know about NG, we know where to get it, we all think NG deserves the credit and the cash.

This will be the nicest comment you get. You have been warned.

BatVink
http://facepaint.me.uk/catalog/default.php AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
eat much pie
13
Years of Service
User Offline
Joined: 9th Apr 2004
Location: Within the mind of a lowly mortal...
Posted: 3rd Jun 2004 12:15 Edited at: 3rd Jun 2004 12:17
@ BatVink

I'll be changing my sig anyway quite soon, once I come up with a name for my new program that I'm gonna sell (for more info, http://darkbasicpro.thegamecreators.com/?m=forum_view&t=32596&b=5).

Cheers for the heads up, but funnily enough, you're the first person to comment on it. Anywho, going back to the topic in hand, can I use Sparky's collision DLL in a commercial program?

Checkpoint Router: my very own AI routing program. Website shall be up soon!
Paul Johnston
TGC Developer
14
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 5th Jun 2004 00:26
Sure, you can use it in a commercial product, only thing I would ask for is possibly a mention in your credits

Paul Johnston.
eat much pie
13
Years of Service
User Offline
Joined: 9th Apr 2004
Location: Within the mind of a lowly mortal...
Posted: 5th Jun 2004 00:44 Edited at: 5th Jun 2004 01:48
Cheers Paul! Do you want me to put an email address or/and a website in as well?

Checkpoint Router: my very own AI routing program. [href]www.angelfire.com/theforce/eatmuchpie[/href]
Paul Johnston
TGC Developer
14
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 5th Jun 2004 01:47
nah, that'll be fine.
Yian
14
Years of Service
User Offline
Joined: 16th Jun 2003
Location: Nicosia, Cyprus(the Greek half)
Posted: 5th Jul 2004 07:33
Sparky the .DLL rules.
Cheers!

I gots to go.
eat much pie
13
Years of Service
User Offline
Joined: 9th Apr 2004
Location: Within the mind of a lowly mortal...
Posted: 6th Jul 2004 06:30
Hey sparky, seeing how intersect object command in 5.4 is all messed up now, could you (or anyone else in the know) show me how to use sparky's plugin to get the same affect as "pick object"? It's really slowing down the program.

Cheers!

Checkpoint Router: my very own AI routing program: http://www.angelfire.com/theforce/eatmuchpie
Paul Johnston
TGC Developer
14
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 6th Jul 2004 08:14
I've recently done a much better version of this but I'm a busy for the next couple of days, so I'll upload it on friday with a new demo. I'll also take a look at that pick object command.

Is the pick screen command still ok? cos you could use that to get a 3D vector then plug that into the dll.
FXTC
13
Years of Service
User Offline
Joined: 3rd Jul 2004
Location: CzechRepublic
Posted: 7th Jul 2004 02:42
very nice job Sparky
eat much pie
13
Years of Service
User Offline
Joined: 9th Apr 2004
Location: Within the mind of a lowly mortal...
Posted: 7th Jul 2004 04:31 Edited at: 7th Jul 2004 04:33
Sparky, would it be possible to implement "group collision detection"? Like, when setting up a collision object, you specify a collision group. Then, when you do the intersect_object command, you can specify the group number to check. Something like this:

setup_object_collision(obj,objecttype,group_ID)

intersect_object(id_number,oldx,oldy,oldz,x,y,z,group_flag)

if group_flag is set to 1, then the ID number represents the group number to check collision against.
If group_flag is set to 0, then the ID number represents the object number to check collision against.

It would be great if you could do this

Checkpoint Router: my very own AI routing program: http://www.angelfire.com/theforce/eatmuchpie
Jess T
Moderator
13
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 7th Jul 2004 23:07 Edited at: 7th Jul 2004 23:08
That is a very good idea EMP... That could really speed the collision checks up. Although, I'm not sure how easy it would be to impliment it into the DLL.

It's a nice DLL Sparky, good work

Jess.

[EDIT]
Sparky, did you originally do the code for the NG DLL?
[/EDIT]


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Paul Johnston
TGC Developer
14
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 10th Jul 2004 04:06
lol, no, I've had nothing to do with the NG dll it's all his work.

Here is the new version I was talking about, I've made it so you put it in your plugins folder and use the commands directly, so no more functions in your code! Also it's automatically included into your exe when you compile so you don't need the dll in the project folder.

I liked the group idea, so I've implemented it as you suggested. Wasn't too much work, don't know why I didn't add it before

There is also a new setupComplexObject command for high poly objects which should help speed it up a lot.

http://sparky152.homestead.com/files/DBPcollisions_v1.05.zip

This file is for DBPro only, since Classic doesn't have the plugins folder or c++ interface (thanks IanM), but if I get enough requests I'll write some DB functions to use the dll from DBC.

Any bugs/suggestions/comments just e-mail me
Sparky_152 at hotmail.com
eat much pie
13
Years of Service
User Offline
Joined: 9th Apr 2004
Location: Within the mind of a lowly mortal...
Posted: 10th Jul 2004 05:38
I'm writing a keyword file for syntax highlighting for the dll at the mo. Excellent job Sparky!

Checkpoint Router: my very own AI routing program: http://eatmuchpie.dbspot.com
eat much pie
13
Years of Service
User Offline
Joined: 9th Apr 2004
Location: Within the mind of a lowly mortal...
Posted: 10th Jul 2004 06:07
Finished the .ini file! You can download it from: http://eatmuchpie.dbspot.com/SPARKYcollision.ini

Just put it into the editor/keywords folder.

@ Sparky:
You may want to include this in your .zip file. I don't mind what happens to it.

Checkpoint Router: my very own AI routing program: http://eatmuchpie.dbspot.com
Paul Johnston
TGC Developer
14
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 10th Jul 2004 06:43 Edited at: 10th Jul 2004 07:32
Thanks emp, much appreciated.

I've included it in the zip file above.

btw if you use BlueIDE you must click tools>RebuildKeywords for it to work.

Also I had a look at the pick object command, and pick screen still seems to work very well so here's some example code to use it with the dll.

+ Code Snippet

seems to be much faster than using pick object.
eat much pie
13
Years of Service
User Offline
Joined: 9th Apr 2004
Location: Within the mind of a lowly mortal...
Posted: 10th Jul 2004 08:32 Edited at: 28th Jul 2004 19:47
Made the help files for your DLL, Sparky. Included in this .zip file is an updated .ini file and the help files. enjoy!

edit:
file is bundfed with dll


Checkpoint Router: my very own AI routing program: http://eatmuchpie.dbspot.com
Paul Johnston
TGC Developer
14
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 10th Jul 2004 10:06 Edited at: 10th Jul 2004 10:07
Thanks again emp.

It's all been added to the DBPcollisions_v1.05.zip above.
DEANO
14
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United States
Posted: 12th Jul 2004 01:14
Sparky, this is some real cool stuff----you-da-man!!



Deano

"When I examine myself and my methods of thought, I come to the conclusion that the gift of fantasy has meant more than my talent for absorbing positive knowledge."
-ALBERT EINSTEIN
BearCDPOLD
13
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 18th Jul 2004 15:47
This is great! Could you update the DBC version? (request numero uno)

Crazy Donut Productions, Current Project: KillZone
Web Site Button Does Not Work, Visit Here: http://www.geocities.com/crazydonutproductions/index.html
Paul Johnston
TGC Developer
14
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
BearCDPOLD
13
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 23rd Jul 2004 13:09 Edited at: 23rd Jul 2004 13:12
Alright!
downloading...
Wow! I got 103 FPS running the demo.

Crazy Donut Productions, Current Project: KillZone
Web Site Button Does Not Work, Visit Here: http://www.geocities.com/crazydonutproductions/index.html
eat much pie
13
Years of Service
User Offline
Joined: 9th Apr 2004
Location: Within the mind of a lowly mortal...
Posted: 26th Jul 2004 18:25
@ Sparky

Could you make another version that allows for terrains to be setup?

I put the command setupobject 1,0,0 just before the main loop in the advanced terrain demo, and the program just exits. It would be very handy if you could!

Cheers!


Checkpoint Router: my very own AI routing program: http://eatmuchpie.dbspot.com
Paul Johnston
TGC Developer
14
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 27th Jul 2004 07:10
The problem it's encountering is there are too many polygons in the single object, which means you can't make a mesh let alone a memblock out of it, meaning I can't get the polygon data for the object
I think the limit is around 21000 polys (65535 vertices).

I'll see what I can do though, maybe there's some other way I can get at the data...
eat much pie
13
Years of Service
User Offline
Joined: 9th Apr 2004
Location: Within the mind of a lowly mortal...
Posted: 28th Jul 2004 03:11
It is possible to save terrains in DBPro, so if you could somehow load the terrain into the plugin (ie. from the hard drive). The only problem is that you'd need to figure out how to load terrains into the plugin.

If you could do this, then you'd get all of the information you'd need!

The syntax could look something like this:

setupterrain GROUP/OBJ NUMBER , GROUP , FILENAME$

Just an idea


Checkpoint Router: my very own AI routing program: http://eatmuchpie.dbspot.com
Paul Johnston
TGC Developer
14
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 28th Jul 2004 07:03
That was one idea I had, but without detailed knowledge of the format it's very difficult.

But I've figured out another way, I've used 'make object from limb' to extract the polygon data from each limb one at a time then make a collision tree from all the data combined. You'll have to be a bit patient for very large terrains, like 512x512 height maps, but the result is worth it.

The command is:

setupTerrainCollision TerrainNum, GroupNum, FreeObject

the FreeObject just being a place to store the limb data while it sets up the terrain, it is released afterwards.

The new version is in my first post, along with a modified version of the terrain example to demostrate (1Mb download)
eat much pie
13
Years of Service
User Offline
Joined: 9th Apr 2004
Location: Within the mind of a lowly mortal...
Posted: 28th Jul 2004 17:42
Great job sparky! It runs at a cool 120 fps, only 3 fps slower than with the original terrain demo!

However, I've just realised that I made a mistake when I wrote the "setobjectcollisionoff" help file. If you go to this page then click on "SPARKYcollision Commands Menu", it says that the file doesn't exist.

I've found out what I did, all you need to do is open up the file in notepad, then go to where it says

+ Code Snippet

and turn the ".html" into ".htm", as below:

+ Code Snippet

Cheers for the great plugin!


Checkpoint Router: my very own AI routing program: http://eatmuchpie.dbspot.com
Paul Johnston
TGC Developer
14
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 28th Jul 2004 20:30
Done.

Glad I could help
Phaelax
DBPro Master
14
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Agartha
Posted: 1st Aug 2004 08:51 Edited at: 1st Aug 2004 08:54
Quote: "Wow! I got 103 FPS running the demo."


that's all? I'm getting 200-350

"eureka" - Archimedes
BearCDPOLD
13
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 4th Aug 2004 17:01
That 103FPS is a great achievement for Sparky though, I'm using a pretty lame computer:
Celeron 1.3ghz, 256ram, Geforce2 MX 400

Crazy Donut Productions, Current Project: Project Starbuks
Sony stole our name!
eat much pie
13
Years of Service
User Offline
Joined: 9th Apr 2004
Location: Within the mind of a lowly mortal...
Posted: 6th Aug 2004 21:26 Edited at: 6th Aug 2004 21:52
@ Sparky,

I've been playing around some more with the plugin and I came across something that's annoying me a little.

If an object has been scaled, then setup with box collision, everytihng works perfectly. If the object is setup with box collision, then scaled, the plugin still uses the old (and incorrect) collision data, as is expected. I've been trying to get this collision data to be updated, but haven't been able to.

The updateobject command doesn't update the collision data in terms of scale, and I also tried setobjectcollisionoff then setupobject, but it still uses the incorrect data.

Would it be possible to make a command like "updateobjectscale". It would be very useful.

Cheers!


[edit]
I've just found out that the same thing happens with sphere and polygon collision as well
[/edit]

[edit2]
Also, Could you put in a function that would completely delete an object's collision data? This would be v. useful
[/edit2]


Checkpoint Router: my very own AI routing program: http://eatmuchpie.dbspot.com
Paul Johnston
TGC Developer
14
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 7th Aug 2004 10:21
yes, that was how it was originally designed, scaling would only work before setup. The only way you could change it was to overwrite the object by setting it up again.

Turns out there was a bug if you tried to overwrite box collision, thanks for finding it, fixed

Version 1.07 now allows you to scale objects and use updateObject to update it. There's a new command 'allowObjectScaling' that you can call on an object to make it update it's size in updateObject. I made it optional because checking collision on an object that is allowed to scale is slightly slower than if it isn't, which becomes noticable if you start checking hundreds of collisions every sync.

I've also added 'removeObject' to remove an object from the collision system.

Check my first post for the new version.
eat much pie
13
Years of Service
User Offline
Joined: 9th Apr 2004
Location: Within the mind of a lowly mortal...
Posted: 7th Aug 2004 18:00 Edited at: 7th Aug 2004 21:28
Cheers for the quick response Sparky, but I think there may still be a problem with overwriting box collision data:

+ Code Snippet

In this demo, a large box is setup with box collision, then scaled to half size, then setup with box collision again. However, the old collision data remains. This works fine for polygon and sphere collision, it's just the box collision.

Also, why is turning dynamic scaling on non-reversable?

Cheers again!


[edit]

Would it be possible have rectangular-raycast commands? eg.

+ Code Snippet

media: http://eatmuchpie.dbspot.com/line.dbo

example syntax: intersectrectangle(x1,y1,z1,x2,y2,z2,width,height)

[/edit]


Checkpoint Router: my very own AI routing program: http://eatmuchpie.dbspot.com
Paul Johnston
TGC Developer
14
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 8th Aug 2004 01:08
That code works here, I should point out that any dll in the project folder will override the dll from the plugins folder, so if you still have the old dll in there it might be what's causing the problem.

Setting scaling on doesn't change the object data, it just uses a different method to calculate the collision. Think of it this way, if you wanted to scale your object by half, I could go through every vertex and make the whole thing smaller, which gets slower for larger or lots of objects. Or I could make every ray you give me twice as large, so relatively it's the same effect. It's this scaling of the ray that makes it slightly slower, and if you were to turn it off the object would appear to be original size again, which sort of defeats the point of switching it on in the first place.

If I gave the option to turn it off someone might get the impression they could turn it on, scale it, turn it off, and expect the new size to remain. Without knowing exactly how it works (^) it gets confusing.

About the rectangle casting, it starts getting a whole lot more complicated when you move away from rays and start doing full blown shapes, another useful one is sphere casting, but they take a while to get right, I may look into it for a later version, but I can't promise anything.
eat much pie
13
Years of Service
User Offline
Joined: 9th Apr 2004
Location: Within the mind of a lowly mortal...
Posted: 8th Aug 2004 02:30
Works great now!

As for the rectangle ray-casting, I'll sufice with doing a few intersectobject commands.

Thanks very much!


Checkpoint Router: my very own AI routing program: http://eatmuchpie.dbspot.com
eat much pie
13
Years of Service
User Offline
Joined: 9th Apr 2004
Location: Within the mind of a lowly mortal...
Posted: 17th Aug 2004 21:22
Sparky, would it be possible to make another version where instead of just getting data on the first polygon collided with, all collisions would be counted. For example:

+ Code Snippet

If you could make something like this, it would really help my program go faster, and would make me happy

Cheers!


Checkpoint Router: my very own AI routing program: http://eatmuchpie.dbspot.com
Sam Wright
Paul Johnston
TGC Developer
14
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 19th Aug 2004 04:30
It should be possible, but the current version is optimized for finding the closest point, it doesn't bother calculating intersection if the polygon is already too far away, so calculating them all anyway is going to make it slightly slower.

So I think I'm going to make this a new command, allIntersectObject or something.

I've also got a few other things added, one bug fix, and a getDistance() command that returns the distance to the collision point, so I'll release another version soon.
eat much pie
13
Years of Service
User Offline
Joined: 9th Apr 2004
Location: Within the mind of a lowly mortal...
Posted: 19th Aug 2004 04:34
Cheers Sparky, sounds great!


Checkpoint Router: my very own AI routing program: http://eatmuchpie.dbspot.com
Sam Wright

Login to post a reply

Server time is: 2017-07-23 23:30:15
Your offset time is: 2017-07-23 23:30:15