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.

Dark Physics & Dark A.I. & Dark Dynamix / Collision systems everywhere... HELP

Author
Message
Chiblue
14
Years of Service
User Offline
Joined: 6th Nov 2009
Location: NE PA, USA
Posted: 21st Jan 2010 14:43
My life with collision systems, I started of using NGC system for my collisions but due to some inaccuracies in it's raytrace return normals, I switched to Sparky's collision, which works well, but requires a significant amount of coding to work around some of the collision dynamics.. Although the ray traced normals work very well...

So once again I find myself in a dilema.. I now need to add velocity, mass, soft and hardbody collisions to my project... and after reading the reference and tutorials for Dark Physics it appears that this will provide these facilities to my project, but and this is a decision point I find myself at... Do I change my entire collision system to use Dark Physics and utilize this for all functions associated with collisions and ray tracing... or keep the Sparky for that and use DP for the other requirements, although I feel that the later is going to create some contension that will cause more headache... any suggestions or recomendations on this, or even any thoughts on Dark physics limitations... i.e. If I convert to dark physics does the raytrace and collision normals report correclty.... Thanks in advance for any help..
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 22nd Jan 2010 11:07
I use sparky's for ALL raycasting and general collision data and DarkPhysics to handle everything else. They work pretty well together.

The main drawback is that some things are broken/missing from DarkPhysics (raycasting is nowhere near as good as sparky's and getting collision forces doesn't seem to work!) so you have to work some things out yourself by storing position data in arrays (for example).

The main answer to your question is that they work pretty well together but as for buying DarkPhysics, I think everyone would tell you to wait for the "Havok" plugin Xarshi is writing (free). Watch this thread to follow progress:
http://forum.thegamecreators.com/?m=forum_view&t=162138&b=8

Chiblue
14
Years of Service
User Offline
Joined: 6th Nov 2009
Location: NE PA, USA
Posted: 22nd Jan 2010 15:34
baxslash, thanks, I actually came to that myself, I replaced my Sparky wth dark physics, after some playing with settings and mass I finally got the gravity and collisions to work pretty well... But as far as ray cast is concerned forget it... I seems that there are holes in the collision meshes...although the debug shows a consistent mesh...

I have a wall, walk over to it and shoot at it (using DP) and on some parts of the wall I get a hit others (same wall) no hit the cast picks up objects behind the wall...

So I basically did what you suggested, used Sparky for the ray cast, and using DP with the character controller for my collisions... seems to work pretty well and without any performance issues...

I did look at the Havok threads, interesting, but it seems like you cannot get a collision system that does all things... like Sparks doesn Raycast very well, NGC nice collisions but raycast sucks as does DP... kind of frustrating... Given the depth of the DP commands it would be nice if it all worked..
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 22nd Jan 2010 15:59
Quote: "Given the depth of the DP commands it would be nice if it all worked.."

Agreed.

Further still it would be nice if when you payed for something you got what you thought you'd payed for...

Fortunately there are a lot of clever people on these forums and they almost always have a workaround but TGC shouldn't rely on a clever community.
[/complaints]

I still love playing with DarkPhysics though!! Check out my Beta (link in my signature) if you want to see what I've been doing with the DP / Sparky's combination...

Chiblue
14
Years of Service
User Offline
Joined: 6th Nov 2009
Location: NE PA, USA
Posted: 22nd Jan 2010 21:45
Nice game... looks fun and nice work with the shadows...

I agree about the "paying" for it part, but I paid for NGC as after some basic collision tests it seemed to work very well, but then when I got to raycasting forget it.. so $25 down, I fortunately (I think) got DP with the Dark Game deal so I did not buy it directly for this...

I am now stuck on if I should just use sparky, although the collision system for FPS is very limiting, or use DP for the collisions and Sparky for the ray cast shooting stuff... The DP character controller is very nice and it seems to work ok after some tweaking...

Quote: " lot of clever people on these forums and they almost always have a workaround "


I did not see any work around for the raycast problem.. oh well
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 25th Jan 2010 12:30
Definitely use sparky's as from what I've done and from other peoples threads it is the easiest and most accurate for raycasting.

I also use it for sliding collision and use a hidden DarkPhysics object which follows the characters position for knocking stuff over.

Quote: "I did not see any work around for the raycast problem"

What are you specifically trying to work around? Maybe I have some code that'll help...

Chiblue
14
Years of Service
User Offline
Joined: 6th Nov 2009
Location: NE PA, USA
Posted: 25th Jan 2010 13:48
My project is a fps and I have all my fps functions built, but I am now trying to add in mass and impact/collision actions. Ie. When I shoot something like a box I want it to react, I am trying to apply a force to the object using dp but when I do nothing happens. Also I an using dp character controller and rigid objects for my collisions but it seems that apply sparky and dp to the same object causes issues. Also dynamic mesh in dp does not seem to work, if I make something static I get dp collisions but dynamic I can walk through the object.

I don't know if the problem is because I have a the same object mapped in dp and sparky but something very messy is going on, I guess I should try without sparky and see if the same happens. Just seems like a lot of agrevation for something that should function.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 25th Jan 2010 13:59
Quote: "if I make something static I get dp collisions but dynamic I can walk through the object."


mesh work backward on this command for dynamics

so
phy make rigid body dynamic mesh id =load
and
phy load rigid body dynamic mesh id =make

one day it will put right.

Dark Physics makes any hot drink go cold.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 25th Jan 2010 14:15
@Chiblue, here is a function which should make objects near where you specify the explosion react as they should (worth reading through!!):


Chiblue
14
Years of Service
User Offline
Joined: 6th Nov 2009
Location: NE PA, USA
Posted: 25th Jan 2010 16:35
Quote: "mesh work backward on this command for dynamics

so
phy make rigid body dynamic mesh id =load
and
phy load rigid body dynamic mesh id =make
"


Sorry, do you mean that instead of using make, I use load to make? Now I see said the blind man.... that would explain LOTS of things...lol
Chiblue
14
Years of Service
User Offline
Joined: 6th Nov 2009
Location: NE PA, USA
Posted: 25th Jan 2010 16:37
baxslash and HowDo, thanks for that I am shooting a box but the principle should be the same... and this will be very helpfull... I am still optimistic about getting DP to do all I need it to.. you guys are helping thanks again..

Login to post a reply

Server time is: 2024-05-04 18:03:13
Your offset time is: 2024-05-04 18:03:13