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 Collision DLL v2.05

Author
Message
Keemo1000
13
Years of Service
User Offline
Joined: 26th May 2005
Location: 28th Dimension
Posted: 3rd Apr 2006 18:21 Edited at: 3rd Apr 2006 18:23
Guys, Im confused, I just wanna have sliding collision in my games, I looked at the demos, extracted the code I needed, modified, and still doesnt work. I have object 1 and object 2, object 1 is the player, 2, lets say,is a house, how do you (activate) sliding collision between them? Please reply while I re-re-check the demos. I dont want you to give me a code snippet for it, just briefly explain how its done with Sparky's DLL ,It looks really good and I dont wanna miss its features.



In DBP - 3D is easier than 2D , 2 player is easier than Single player , Dont you think life rocks .. ?
Keemo1000
13
Years of Service
User Offline
Joined: 26th May 2005
Location: 28th Dimension
Posted: 3rd Apr 2006 21:04
Uhh, TGC ?



In DBP - 3D is easier than 2D , 2 player is easier than Single player , Dont you think life rocks .. ?
Paul Johnston
TGC Developer
16
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 3rd Apr 2006 23:08
Quote: "how do you (activate) sliding collision between them?"


Not quite that simple, what you do is record the last position of your player, move him, get his new position and then check the ray between them (using SC_SphereSlide).

If your player has hit something in this movement then you use SC_GetCollisionSlideX() to get the player's new position and position him yourself. This makes it look as if your player has slid along whatever he has hit.

Zink
12
Years of Service
User Offline
Joined: 2nd Apr 2006
Location:
Posted: 4th Apr 2006 14:12
Me again!

I've installed and activated the Advanced Terrain thing but now all i get is a black screen for about 5 mins then it just quits.
I tried it in step-through and it gets stuck at line 33- sc_setupTerrainCollision 1,1,2
What am I doing wrong???
Keemo1000
13
Years of Service
User Offline
Joined: 26th May 2005
Location: 28th Dimension
Posted: 5th Apr 2006 15:42
I hate Advanced terrain! Its so troubling



In DBP - 3D is easier than 2D , 2 player is easier than Single player , Dont you think life rocks .. ?
Freddy 007
14
Years of Service
User Offline
Joined: 30th Nov 2004
Location: Denmark
Posted: 5th Apr 2006 15:51
Doesn't the Advanced terrain get installed together with dbp 6.0 RC 4?

Paul Johnston
TGC Developer
16
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 5th Apr 2006 15:57
Quote: "all i get is a black screen for about 5 mins then it just quits"


That was a bug introduced in U6 RC2, should be fixed for RC3 and beyond

Lost in Thought
15
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 5th Apr 2006 23:50
You shouldn't install and activate advanced terrain from DBP 5.8 up as it is included with DBP.

Hawkeye
15
Years of Service
User Offline
Joined: 19th Sep 2003
Location: SC, USA
Posted: 7th Apr 2006 01:01 Edited at: 7th Apr 2006 01:01
Congrats on newsletter appearence (although I'd've been amazed if they had excluded you <.< )

Just would like to say again that this plug is really amazing, it's solved every collision problem I've ever had, handles sliding collision wonderfuly, and has wonderfuly speedy raycasts... I couldn't do without it. Thankee!


I am but mad north north-west; when the wind is southerly I know a hawk from a handsaw - Hamlet, Hamlet
Jack
14
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 7th Apr 2006 17:38 Edited at: 7th Apr 2006 17:38
Sparky ive got a problem with "walkheight" and collision.
My Idea is simple A sphere is for the floor collision responsible
an other sphere that is positioned a litte bit over the first
sphere is for the camera collision responsible. If you press the
duck-key the y position of the sec. sphere will be the same like
the first one but ive no idea how to do a multiply-collision and movement code. can you help me please ?

[/center]
coolgames
13
Years of Service
User Offline
Joined: 26th Sep 2005
Location: Oregon, USA
Posted: 7th Apr 2006 17:46
Quote: "But using this method,I am unable to change the car's Y angle > which direction the car is going. I have really no idea how i can do this in a diffrent way. Maybe you can help me ?"


Get ezrotate. It makes this amazingly easy.

Jack
14
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 8th Apr 2006 22:06 Edited at: 8th Apr 2006 22:49
How can I add walkheight to the Sliding Demo example?

[/center]
Paul Johnston
TGC Developer
16
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 9th Apr 2006 00:30
@Hawkeye - Thanks

Quote: "How can I add walkheight to the Sliding Demo example?"


Best I can suggest is you get the sliding direction of the ground sphere, moved in the player direction as normal, then move the camera sphere in this new direction. If a collision occurs on the camera sphere then your safest bet is to use the sticky collision points to stop the player moving through walls. If no collision occurs on the camera sphere then you're safe to use the sliding points gathered from the ground sphere.

Jack
14
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 9th Apr 2006 02:29
My Idea is to make 2 spheres camera sphere/ move sphere.
The camera sphere will be positioned a litte bit above the move sphere
then
DBP should detect the collision of both i.e If the one will collide then both
will be set to the old position.
But I dont know how to code that.

[/center]
Keemo1000
13
Years of Service
User Offline
Joined: 26th May 2005
Location: 28th Dimension
Posted: 9th Apr 2006 21:54
Thanks Sparky, one more question though, if we have 2 different models, what's the advantage of putting each in its own group respectively, and would it really change matters if each is independent with no group ?



In DBP - 3D is easier than 2D , 2 player is easier than Single player , Dont you think life rocks .. ?
Largo Winch
12
Years of Service
User Offline
Joined: 31st Mar 2006
Location:
Posted: 10th Apr 2006 16:24
Hi please I wana how to setup Sparky Collision system with DBP !!!
Thanks !!
Paul Johnston
TGC Developer
16
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 11th Apr 2006 19:32
Quote: "DBP should detect the collision of both i.e If the one will collide then both
will be set to the old position.
But I dont know how to code that.
"


A very quick example:



I haven't tested it but it should be able to get you started.

Quote: "what's the advantage of putting each in its own group respectively, and would it really change matters if each is independent with no group"


There should be no extra overhead in using objects in groups, they allow you more flexibility over what gets checked.

For example you could put all your scenary/walls/etc into one group, and all your enemies in another. Then if you wanted to do a line of sight check but not have entities block the ray you only need to check against the scenary group.

Quote: "I wana how to setup Sparky Collision system with DBP"


The included readme explains where to put the DLL, and the examples show you how to use it.

Largo Winch
12
Years of Service
User Offline
Joined: 31st Mar 2006
Location:
Posted: 11th Apr 2006 20:27
Sparky I've already setup the sytem !!
now I've a level.x !!
how to make it's collsion ..??
Thanks !!
Jack
14
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 12th Apr 2006 20:36 Edited at: 12th Apr 2006 20:37
Just look into the Collision Example.
Edit: @Sparky thanks Ill test it soon

[/center]
Jack
14
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 12th Apr 2006 23:24 Edited at: 12th Apr 2006 23:37
Ive tried to upgrade the "Sliding Demo" with your scoure - but nothing happen.

[/center]
Largo Winch
12
Years of Service
User Offline
Joined: 31st Mar 2006
Location:
Posted: 12th Apr 2006 23:26
U have to upgrade your DBP before !!
Jack
14
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 12th Apr 2006 23:36
I have

[/center]
dab
14
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: You Temp Folder!
Posted: 16th Apr 2006 02:15
I am having trouble with my level. I try to set the collision on the level, put the object in the middle of the level (inbetween the walls), but I can't move. I thinks I'm running into something, but I'm just sitting there....

FPS Fighter
12
Years of Service
User Offline
Joined: 15th Apr 2006
Location:
Posted: 16th Apr 2006 07:59
As I have understand from your post:
u haven't code neither player movmenet nor the collision. u have to code the collision with Sparky's Dll 2.0 V.
Hawkeye
15
Years of Service
User Offline
Joined: 19th Sep 2003
Location: SC, USA
Posted: 16th Apr 2006 16:37
dabip, mess around with the radius setting when you call sc_sphereslidegroup.

Sparky, any chance of a sc_setcollisionoffset command? Something that would let me adjust the collision sphere's position. My model's center is at his feet, so the collision sphere currently hangs down beneath his feet. If you can't do it, that's fine, I'll make a workaround, but it'd be a nice feature


I am but mad north north-west; when the wind is southerly I know a hawk from a handsaw - Hamlet, Hamlet
dab
14
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: You Temp Folder!
Posted: 17th Apr 2006 06:49
I have code, I really took the functions from the demo with the NG Dll, and modified them. here is the whole project I have so far.... (there isn't much)

Attachments

Login to view attachments
Paul Johnston
TGC Developer
16
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 17th Apr 2006 18:12 Edited at: 17th Apr 2006 18:12
@dabip - I've looked at your code and it looks like your radius is too large, a value of about 10 seems to work.

@Hawkeye - Setting up an object with sphere collision should automatically adjust the sphere to the true center of your object. However I believe there were some problems with boned objects not registering properly, in which case the best work around I can suggest is:



Hawkeye
15
Years of Service
User Offline
Joined: 19th Sep 2003
Location: SC, USA
Posted: 17th Apr 2006 19:41
Yeah, but the problem is the center of the object is at his feet. I'll check out your code, looking at it now it seems it would work


I am but mad north north-west; when the wind is southerly I know a hawk from a handsaw - Hamlet, Hamlet
dab
14
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: You Temp Folder!
Posted: 18th Apr 2006 05:01 Edited at: 18th Apr 2006 05:02
Thanks. Didn't even think about that. Thank you!

edit: Oh yah, nice Dll.

Jack
14
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 21st Apr 2006 18:07
I tried to include your code into your example. But without success
here is the stuff..

[/center]

Attachments

Login to view attachments
FPS Fighter
12
Years of Service
User Offline
Joined: 15th Apr 2006
Location:
Posted: 21st Apr 2006 18:43 Edited at: 21st Apr 2006 21:29
How to combine Sparky and Tempest Systems !
Please Sparky can u help me to insert your the collision in my code or any one else !
Thanks a lot!
Paul Johnston
TGC Developer
16
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 21st Apr 2006 22:27
@Jack - I've attached some modified code to this message, you needed to declare 'cameraheight#' as global otherwise it can't be used in functions, and you also needed to reset the position of all three axes x, y and z when the camera sphere hits something.

If you want to be able to walk up stairs with a small radius and a big step, as you have, uncomment the to lines which describe a solution to being given a boost up stairs and modify the vy# = 1.0 to a value that suits you.

@FPS Fighter - I haven't used Tempest so I don't know the effects, if any, of using the two together. And you can't just ask people to do all the work for you, if you have a specific issue then people are more likely to help.

Attachments

Login to view attachments
Jack
14
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 22nd Apr 2006 22:32
But there are some bugs in it:
If the player has a x/z collision you cant jump
and if you jump while standing under the platform the
camera sphere collision will be ignored. Can you help
me to fix this bugs - I cant find the reason.



You can download the current version - Ive just scaled the
level up - now you can move under the platform

[/center]

Attachments

Login to view attachments
nuclear glory
15
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 23rd Apr 2006 02:33
I admire the work & dedication being done here. It goes without saying, but keep at it

Powerful Collision DLL for DBPro and DBC: http://www.nuclearglory.com
Keemo1000
13
Years of Service
User Offline
Joined: 26th May 2005
Location: 28th Dimension
Posted: 23rd Apr 2006 10:46
@Sparky:

You tricked me!!! Just kidding, lol. I finally got the sliding collision to work, just two problems:

Problem 1:
My object is more complex than a sphere, a duck actually. Whenever there's collision, the duck's beak and feet go through the other object, while the "center mass" or center of the model doesnt. Ive set up the object to polygon collision. I also tried sphere collision, but that didn't work either. Is there a way to solve this problem ?

Problem 2:
When the player collides with certain sides of a cube-like object I made, the player goes back and forth in a repeated manner causing it to shake the whole screen and give you a lag-like impression. Is there a way to get rid of this bug ?



In DBP - 3D is easier than 2D , 2 player is easier than Single player , Dont you think life rocks .. ?
FPS Fighter
12
Years of Service
User Offline
Joined: 15th Apr 2006
Location:
Posted: 23rd Apr 2006 14:21
HI I'm using spary dll's collision in my game but with stairs it's not working? what have I to do?
here is my code

Attachments

Login to view attachments
Jack
14
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 23rd Apr 2006 15:40
Maybe the stairs are too high

[/center]
FPS Fighter
12
Years of Service
User Offline
Joined: 15th Apr 2006
Location:
Posted: 23rd Apr 2006 16:00 Edited at: 23rd Apr 2006 16:01
No I don't think so this is the sreen shot here. But if it is what i have to do?

Attachments

Login to view attachments
Paul Johnston
TGC Developer
16
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 23rd Apr 2006 17:08
@FPS Fighter - I have replied in the other thread, but from your screenshot it does look like your stairs will be too high, again have a look at the sliding demo provided for a solution to this.

Jack
14
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 23rd Apr 2006 20:23
@FPS Fighter: why are you using "stairs" ? - Or am I wrong and Hover-crafts can climb up walls ?

[/center]
spooky
16
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 26th Apr 2006 18:17
Using V2 Dll and U6RC10 - Can't get your supplied Scaling Demo working correctly - it's as if SC_allowObjectScaling is doing nothing. Is is possible that RC10 is to blame because of the new way you get objects size, which is now different;

object size x(obj) returns original size
object size x(obj,1) returns size taking scale into account

Boo!
Paul Johnston
TGC Developer
16
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 27th Apr 2006 15:10
That would cause a problem, I've uploaded a new version that uses the new object size command. It should also still work with pre-U6 versions.

Check my first post for the new version (2.01)

spooky
16
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 27th Apr 2006 16:05
Yep, that fixed it. Thanks.

Boo!
Bush jumper
13
Years of Service
User Offline
Joined: 28th Nov 2005
Location: United Kingdom
Posted: 30th Apr 2006 09:46
hi sparky, all i hear are good things about your collision system, but i am having a seperate problem to everyone else, when i go to compile the examples you have included with the dll and the terrain demo its all working great, but when I run the .exe it crashes and asks me to report the error.
I'm using dbpro update 5.9 any ideas? sorry if its a stupid question i have been up all day and all night
p.s. i've the attached temp .txt it is going to send if i do report it, thought it would be best to skip the middle man
thanx

Life goes on
Uncle Sam
13
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 3rd May 2006 06:03
Great job Sparky.

Uncle Sam
Nvidia Geforce 7600 GS 256MB PCIEx, 2.66 GHZ Pentium 4 proccessor, 768MB RAM
Need particles? Click here!
NeX the Fairly Fast Ferret
13
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 7th May 2006 00:53
Awesome. Not quite as fast as NGC (but who is going to miss 1 FPS?) but FAR more accurate. I found myself getting stuck in walls and the x angle being changed very often with no explaination with NGC, but this is perfect.


At least farting ferrets are better than stinky stoats.
Oddmind
14
Years of Service
User Offline
Joined: 20th Jun 2004
Location: Atlanta, Georgia
Posted: 8th May 2006 03:35 Edited at: 8th May 2006 04:19
the new DLL wont work with either version 6 RC10 or the newest "official" version 6. Im talking about DBPro Collisions v2.01.

I get an error everytime. Can you please post the version 59 dll again so I can use it? It was working fine before I upgraded. I have the newest direct x, DLL and Darkbasic pro. I dont know what is wrong, this is really frustrating me.

I want to try and downgrade back to 5.9 but you took down the origional version 2.0 dll.

formerly KrazyJimmy

I'm the lizard king, I can do anything.
Freddy 007
14
Years of Service
User Offline
Joined: 30th Nov 2004
Location: Denmark
Posted: 8th May 2006 20:10
I don't get any trouble with dbpro v6... I can compile source code with v6, and the code was written and compiled with older U6RC's as well.

Paul Johnston
TGC Developer
16
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 8th May 2006 21:18
@OddMind - What sort of error do you get, and what code are you trying to compile when you get it. Very little changed between 2.0 and 2.01
Oddmind
14
Years of Service
User Offline
Joined: 20th Jun 2004
Location: Atlanta, Georgia
Posted: 8th May 2006 23:08 Edited at: 8th May 2006 23:10
I have tried every piece of code that uses the DLL, none work. I get this.

I tried changing the exe to a non temp, still nothing...

I get this



Again this is the Newest DBPro, and the Newest collision DLL. I have also tried the RC10 with no luck. When i reverted to DBPro 5.9 and collision 1.8 the examples for that version worked, but my commands for my game arent in that version of the dll. The setup complex object command i had didnt work in it.

formerly KrazyJimmy

I'm the lizard king, I can do anything.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2019-03-25 21:01:18
Your offset time is: 2019-03-25 21:01:18