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 / what is up with the raycasting commands.

Author
Message
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 15th Oct 2006 09:17
im just trying to raycast straight out in front of my character 1000 units, and then if it happens to have something in the ray return the distance, and object id for the intersected object.



i keep getting an error about it needing to be as a vector. What the hell does this mean i thought you just had to supply a startx,y,z and a endx,y,z for it to cast a stupid ray and return a value of 1 if you hit something or 0 if you didnt........

Why does it always seem like dbp and its add-ons are great then something stupid like this always stumps me. It seems like such an easy thing but why cant I get it to work. As always any help would be really appreciated....Thank you
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 15th Oct 2006 09:51
You know what never mind. I making the leap to sparky's for this stuff. I got it working so easyily, now I can move on to the next step....Thank you.
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 15th Oct 2006 10:37
I too have this problem, and sparkys dll isn't ideal for moving physics bodies as you must update each object in realtime.

Hallowed are the ori.
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 15th Oct 2006 11:18 Edited at: 15th Oct 2006 11:20
all I am using sparkys for is the intersect commands. Thats it. I use physix for the collision checks, as it just puts it onto a stack and you just read them from there and a little clever coding and now I got perfect raycasting from my player to 1000 units out, and accurate collion detection each time my player/shoots/throws something.


btw. I tried to get ccd working but that crap dont work properly. Its totally underdocumented for one and buggy as hell.....I am really starting to get sick of the outdated help files, and undocumented/vague explanations. Its really putting a strain on my ability to code this program.
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 15th Oct 2006 11:27
I am just going to complain a bit more here cause this is really starting to bother me. Dont let my join date fool you, I have been using db before dbp came out, at least since 2001, Id have to check my e-mail recipt to confim that but. I just have to say ever since I have started this game programming hobby, I have ever been confused by the god awful help files/examples. I mean I paid good money for alot of programs on this site. dbc,dbp,treemagik, and now darkphysics....I know this isnt alot of money over all those years, but I swear to god when I spend money on something I expect it to work fairly decently.....Ok so at first I thought I didnt know what I was doing, and I really didnt, but the crappy help files didnt help anything. And now years later, I buy dark physics, I figure on a expansion product this big that they built up as the next best thing. yes their would be bugs, but come on people lets fix the help files for christ sake, when you pay good money for something you expect at least some kinda decent help........Thank you.
Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 15th Oct 2006 12:39
What is the error message you get when using the command? Have you looked at the demo that shows how to use ray casting? Have you read the ray casting tutorial?

Here's an example of how to use CCD -


As for the documentation - what would you like to see done in the future to improve it?
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 15th Oct 2006 13:21
I already delete all the code I was using, but the message I was getting was it couldnt create a "skeleton" And yes I have read the help files, and I have looked at every single demo, even the 2 games supplied, I have gone over. pachinko and landeroid I think. And the bridge demo doesnt work properley either. It works without shaders/reflection/shadows....When it should work with all of them enabled. I dont know why it doesnt work but I can gurantee you one thing its not my system. Just so you know my system does support shader 3.0 and just so you know my specs are. AMD X2 3800, 1.5mb ram, ATI x1950xtx, bfg physix card, windows xp will all the latest drivers for everything. I am not afraid to spend the money to make a good computer or for the software to go along with it. I picked apart the code already and when I put it into my program it does not work. But then again it could be becuase I dont know what I'm doing, but then again this is only compounded by the fact, you have a commercial product, that has vauge descriptions at best.

To improve the documentation you need to do something like this guy did....




Its a very very simple program, but explained so well that even someone who dont know a thing can look at it and tell you whats suppose to happen.

Now here is a classic dark physics example....


This is exactly what you or whoever is making this crap up should not be doing.

First you tell us a command: phy set rigid body ccd motion threshold

Second you dont tell us what the hell minimum velocity is or how it relates to any kind of movement. I mean how do we know what to set this to, when its not even explained anywhere.

so I type it in, and this one by chance happens to be recognized by the keywords and there is a short description on it......



NOW IF THAT IS NOT VAUGE THEN I DONT KNOW WHAT IS. There is absoutley no reference point to go by to even begin setting a "new threshold level" Maybe I dont want to spend 6 hours typing in values to see what "might" happen. Give us a break here.

Now dont get me wrong not all of the help is crappy, its hit and miss just like the dark basic pro help files.



thats it, thats the stuff im talking about. I am sure I am not the only one who has noticed this.

And the examples leave alot to be desired, for both dark physics and darkbasicpro.
Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 15th Oct 2006 15:15
What is the full error message? Show me a full example of what you're doing with ray casting otherwise I can't help you.

With the bridge demo what happens? Again it's no use saying it just doesn't work - I need to get more info off you. What exactly doesn't work? Do you get an error message?

I can see what you're saying about adding in more comments into the programs but there are several tutorials to guide you through and lots of background information. It always helps to have more but I think it's a good starting point for most people.

The motion threshold for CCD is explained in the Advanced section of the documention. I didn't see the point of replicating all this info in the reference section.

In what way do you think the examples need to be improved? Maybe I can do more for updates but unless you be more specific then how am I supposed to know what you want.
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 15th Oct 2006 18:46 Edited at: 15th Oct 2006 18:51
ok here is the error in this screenshot.


here is the code



just un-remark the line "phy set rigid body ccd bullet_obj(i), 1" and you will also see it crash.

oh yeah also, when i try the bridge demo with everything enabled it gives me 2 cubes and nothing else.

Attachments

Login to view attachments
Codger
21
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 15th Oct 2006 19:09
I have the same issue

CCD works when you use a box

but fails and gives the skeleton when used with a sphere

System
PIV 2.8 MZ 512 Mem
FX 5600 256 mem
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 15th Oct 2006 23:15
@codger you are correct it works with this command

Phy Make Rigid Body Dynamic box bullet_obj(i)

but unfortunatley they dont behave properly, as they bounce off at what seems to be 90 degree angles now. Which is why I was using the sphere deal. I guess I will just have to make a choice as to using no ccd or crappy physix using ccd. Looks like its not a good chioce cause both ways are flawed. Too bad the commands just dont work like they are suppose to......Thank you.
Codger
21
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 16th Oct 2006 01:41
David W
You can imagine the effect of using a box on my pool balls in my pool game. I have no idea if it will work but have you tried using a capsule?

System
PIV 2.8 MZ 512 Mem
FX 5600 256 mem
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 16th Oct 2006 03:00
@codger Capsule does not work, the only one that does is box. So much for hitting the cue ball at any velocity you want. lol. Just slow it down enough so that, standard collision works. lol. the fun.. or better yet go with the box method and re-invent pool so that it only works at right angles. Good Luck....
VRMan3D
18
Years of Service
User Offline
Joined: 3rd Apr 2005
Location: New England
Posted: 2nd Nov 2006 12:51 Edited at: 2nd Nov 2006 13:05
Quote: "btw. I tried to get ccd working but that crap dont work properly. Its totally underdocumented for one and buggy as hell.....I am really starting to get sick of the outdated help files, and undocumented/vague explanations. Its really putting a strain on my ability to code this program. "



David, a lot of us feel the same way. I hope someday that TGC gets the point. We spend money on a product and expect it to be what they say it will be yet it seems they just whip it together and never bother to go through and make sure all of the docs and help files are complete. Any other professional company would make sure every single command works as it's supposed to, and that the docs are up to date, complete and have an example for each command. I think TGC would have a much much much more positive response from people if they would just take a day and go through every page of the help files and carefully update them. I mean how long could it take? The result would be some very happy users and less tech support on their part (which would $ave money in the long run for sure).

Quote: "Dont let my join date fool you, I have been using db before dbp came out, at least since 2001"

Me too, been using this stuff since the first version - I used to code my stuff in str8 c using Direct3D retained mode, and many times I *almost* just toss the Dark products into a dark corner, but unfortunately the time they save still usually makes up for the endless hours we all spend trying to get some poorly documented feature to work like it says.

Please TGC, this isn't an isolated comment. I've heard the same thing so many times here and directly from people who ask me for help. Why not just take a week, set other stuff aside and go through every help file and fix it. Why not also do like I suggested 4 ago (I don't expect you to remember it) and make a little 'contest' or just ask people to all write small, simple, well commented samples for each and every command in DBPro and the expansions? I mean come on, the 'Showcase examples' in dbpro are a complete waste of time. I'm sure people would be happy to write all your samples for you if you just leave their name in the first rem statement to give them a little glory.

Just trying to help, I love your products but you need to fire the person in charge of the docs ha ha.

-=VRMan=-
>>Edit>> by the way I was just about to purchase DarkPhysics and your comments make me wonder if I should subject myself again to this. How many things in DP don't work as they claim? How bad are the docs (I noticed one command in the demo docs that has one thing in the title, and the syntax part shows a completely different command.??)

World Famous 3D Screensavers
-- http://www.vrman3d.com --
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 8th Nov 2006 02:05
dp is worth the money, even though the help/docs/examples suck nuts. I highly recommend dp, it really does make things better. Thats my word on that.
westray
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Falkirk,Scotland
Posted: 17th Nov 2006 22:32
Just a thought as you are using a dual core CPU.when you run the .exe file press control/alt/delete to bring up the task manager.In processes find the .exe file and right click on it.Where it says set affinity click on this and disable CPU 1. and try the game again.Do not come out of the running exe file or you have to go through this procedure again.
VRMan3D
18
Years of Service
User Offline
Joined: 3rd Apr 2005
Location: New England
Posted: 25th Nov 2006 17:06
To Mike Johnson:
Quote: "I can see what you're saying about adding in more comments into the programs but there are several tutorials to guide you through and lots of background information. It always helps to have more but I think it's a good starting point for most people. The motion threshold for CCD is explained in the Advanced section of the documention. I didn't see the point of replicating all this info in the reference section.
"


Perhaps you could (at the very least if you're not too busy) put a link or at least mention that the mysterious information required to get CCD working is in the advanced section of the other information.chm help file. He's right that the dox are feeble, and so are the examples. I too gave up trying to get CCD working when it kept coming back with the 'skeleton' error messages.

Perhaps you should change your paradigm / mindset regarding documentation to 'bore them with too much documentation, and examples with too many comments.' so that people stop getting frustrated with your products. I only say that since I've wasted untold hours while rushing to finish products, only to eventually give up everytime when I run into some broken or undocumented bit (and I've been coding 3D stuff (for companies like NEC - professionally) since before hardware acceleration, so It's not like I'm a retard =). Once again I hate to sound so negative, but it just seems like TGC never gets the hint that we'd like them to stop making new products to $ell for a few weeks and just flesh out all the docs, and fix the bugs in their current flagship products that we've spent money on already, and
Quote: ""dont want to spend 6 hours typing in values to see what "might" happen. Give us a break here." "
like david w said above.

Thanks for listening.

World Famous 3D Screensavers
-- http://www.vrman3d.com --
SirFire
18
Years of Service
User Offline
Joined: 4th Apr 2005
Location: North America
Posted: 22nd Jan 2007 11:13
I agree whole-heartedly with the attitude of this thread.

I'm currently trying to do a golf game, and here are the problems I've encountered:

* physics runs too slow
* physics timing commands are vague
* physics "phy set auto fixed timing" produces random speedups/slowdowns
* using the default physics timing, you have to set gravity insanely high to get things moving at the right speed
* scaling down the scene instead of changing gravity causes small objects to fall through meshes
* scaling things back up and using a large gravity also causes small objects to fall through meshes
* the whole time all this messing with gravity and scaling is taking place, you have to keep tweaking your material properties up and down so that things continue to react the way they are supposed to
* ccd only works with cubes, so the golf ball makes the "skeleton" error
* ccd documentation says something about using stray vertices not connected to triangles in the skeleton mesh, but how do apply this skeleton mesh to an object, and how do you go about making stray vertices that don't connect to anything
* Mike Johnson said something about putting in commands for glueing cubes into spheres or some other such nonsense, havn't seen anything about it since then. But would good would box-type collisions do when you're trying to get sphere collision effects?

I've always complained about the help files, they've got like 2 huge program examples that encompass all of the commands, the command descriptions often don't include all of the parameters a command actually takes, there's undocumented commands (usually only discovered when a user has an issue and a mod pops in and says, "oh well use the fubar command", and everybody's like "There's a fubar command?!? Wow that makes life a whole lot easier!"), there's commands that don't highlight in the editor, there's commands that do everything but what you would expect them to do (i.e. NOT or TURN OBJECT).

And don't even get me started on the buggy editor THAT COMES WITH dbp and they downright refuse to replace. You know the one that likes to wipe your files clean? How nice.

It may appear that I'm just dissing TGC. I'm not, I'm just telling the truth that many many others agree with: TGC needs to get their act together and act professional.

Now let me predict what reponses to this post will say:

1. Some user will flame me and say I just don't know what I'm doing. And they'd be right, I don't know what I'm doing b/c trying to follow the documentation is akin to locating the lost city of Atlantis.

2. Some TGC staff member will ask me for specific instances, error messages, source code, screenshots, etc so that it can be fixed. This is all fine and dandy, it really is, but that doesn't address the issue this thread is about, and that issue is DBP documentation as a whole. I'm in my early 30's, I've been programming since I was 12. Back then I started with a Tandy CoCo II, and a BASIC programming book. Each command was well defined, every single possible parameter was indicated, an example program was used for every command that showed how each of those parameters affected the program, and every command in the documentation worked exactly as it was supposed to in the program.

3. Some Mod will decide that this post is too negative and critical of TGC and lock the thread b/c it doesn't reflect good on TGC products. There's nothing that can prevent that, but locking the thread won't change anything. People will still be highly frustrated with the documentation, highly frustrated that commands act weird, and highly frustrated that nobody at TGC does anything about it.

4. Some user will agree with us (if the thread doesn't get locked), and maybe others will agree too, and maybe (just maybe) something might get done about the situation.

5. Some user will suggest I get Dark GDK. Someone always does that. No.

Yeah well, I've been wanting to say all this for some time, I've wanted to say other things too, but I've been patient, we've all been patient. The time for patience is past.

And as a footnote, the question frequently arises in my mind, "Why do you keep using this stuff?" The answer is: It's still easier than c++ and (except for c++) more powerful than anything else I've seen. But there comes a point when easiness is offset so much by time spent trying to figure out what's going on, you might as well be doing c++ b/c you'd at least be responsible for your own bugs. I'm near that point, when c++ with it's exhaustive syntax and cryptic data types and classes and #includes and all that other complicated jazz looks so very appealing compared to sitting for hours searching through the forum and help files trying to figure out how to use a command, only to find out the command has a bug and doesn't work properly with certain objects, the kind of objects that you desperately need it to work with.

There, it's off my chest.

david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 22nd Jan 2007 12:13
I've posted many complaints about these very issues here and in other threads my solution.

I gave up. It's pointless nobody is listening.
Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 22nd Jan 2007 12:16
SirFire, I can understand your frustrations with Dark Physics but things can be sorted out. We can work together to resolve these issues but to do this I need your help.

You say that physics runs slow - I can't do anything about that without seeing a demo or some more information. I have been using Dark Physics in a very large application with many rigid bodies and not encountered any problems. Perhaps you are using a specific command or set of commands that slows things down. Unfortunately unless I see something then there's not much I can do. As much as I would like to I don't have the time to sit here all day trying to figure out what is running slow. If you can help me out and show me something then I can do something about it.

I can write some extra documentation about the physics timing commands. My advice for now is to stick to the default timing as it is the recommended method by Ageia.

Using the command phy set auto fixed timing will result in an initial catch up / slow down phase to match the frame rate. It can also be affected if there is a sudden drop in frame rate. I don't think this can be avoided.

If you find you have to set gravity too high then I get the impression your scene is way too big. When using physics it is important to stick to small sizes. Try and keep your level within say a range of -2000 to 2000. Keeping things on a small scale will help to ensure the system runs optimally.

Scaling can cause problems with small and large objects. Again I believe this to be down to using scenes which are too large.

I can probably change CCD to allow it to work with more objects. Need to check the Ageia SDK on this one and also add in some extra commands for more control.

As for your last comment - I'm not sure what you mean. I mentioned a while back about commands where you can do things like take one object and have a rigid body created for each limb. Might be that you are referring to. That can be sorted out.

I agree that the documentation needs more work but I think you're a little harsh on it. There is a great deal of information in there and to say "they've got like 2 huge program examples that encompass all of the commands" is completely wrong. There are over 100 example programs in there showing all kinds of things. Have you looked at these? Have you read the tutorials? I will go through it soon and see what can be done.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 22nd Jan 2007 12:38
I can agree with the help files need expanding abit, but there is clearly tons of examples on using the physics plugin. Make sure you go to your order history and use the Download Physics Projects link to get all the extra examples. Best I can remember there are around 85 demos and 15 or so tutorials. Possibly more plus the codes posted in the techniques sticky above this.

My main boggle with Dark Physics is the missing make cloth from object command. I cannot use it without this. The collision system could use alot of feedback work, but I can make my own routines for that I believe. Once the Make cloth from object command is in the DP, I'll add it to my open source engine. It won't be until then that I will know for sure if I can create the type of collision system I want with it. It's not worth wasting my very little free time playing with a plugin that currently can't do everything I need command wise.

SirFire
18
Years of Service
User Offline
Joined: 4th Apr 2005
Location: North America
Posted: 22nd Jan 2007 14:02 Edited at: 22nd Jan 2007 15:59
Quote: "We can work together to resolve these issues but to do this I need your help."


Thank you Mike.

Quote: "I have been using Dark Physics in a very large application with many rigid bodies and not encountered any problems."


I'm certain this is true, since you are a developer of the product and know it better than end-users. (this is where better documentation would help us)


Quote: "As for your last comment - I'm not sure what you mean."


I was referring to this thread on the last post.

Quote: "to say "they've got like 2 huge program examples that encompass all of the commands" is completely wrong."


I was more referring to the base help files for DBP, not the DP help files, most commands in the DBP help files refer to the same two "showcase" and "usage" programs that usually show just the command in use, not what the effects of all the parameters do.

Quote: "Have you read the tutorials?"


I started to, but stopped when I saw things like this:
post

Below is the code from my project, i have stripped out functions and routines that deal with multiplayer aspects. Please excuse the messy code, that is a result of hit-and-miss methods of trying to get things to work right. Media attached to post.

left/right aims, tap ctrl to hit, hold ctrl to go higher.



Attachments

Login to view attachments
Dark Angel_1246
19
Years of Service
User Offline
Joined: 7th Jul 2004
Location: Australia
Posted: 15th Apr 2007 10:31
hmmm no comment hay Mike.

Intel Pentiuim D 3.4 Prossesor - P5W DH Deluxe Dual Graphics Motherboard - 512MB ATI X1600 Graphics Card - 2GB 5400 DDR2 RAM - 320GB Harddrive - www.bristlebusters.com

Login to post a reply

Server time is: 2024-03-29 11:33:40
Your offset time is: 2024-03-29 11:33:40