ODE Torque Stuff
by Gary "ChunkyKs" Briggs · in Torque Game Engine · 05/18/2005 (5:16 pm) · 89 replies
From my .plan just now: www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7870
Here's some source:
icculus.org/~chunky/stuff/odescript/odescript-2005-05-18.tar.gz
Gary (-;
Here's some source:
icculus.org/~chunky/stuff/odescript/odescript-2005-05-18.tar.gz
Gary (-;
#2
Updated version, with mostly working collisions, although I need better depth calculation.
Gary (-;
05/20/2005 (1:54 pm)
icculus.org/~chunky/stuff/odescript/odescript-2005-05-20.tar.gzUpdated version, with mostly working collisions, although I need better depth calculation.
Gary (-;
#3
05/20/2005 (3:36 pm)
I was perusing thru this today Gary and it seems like it's a very low level binding with ODE. It doesn't seem to deal with interior and terrain collisions yet correct?
#4
Akio was posting comments like "what do you want this to work with?", and people would reply "ragdolls" or "vehicles". Well, doing it this way, y'all can use it with whatever you want it to.
No, it's not in TGE yet, just T2D. TGE is next on my list after I release a resource for T2D. My intention is to create a resource that's basically a differently-implemented ODEItem, and go for there.
Gary (-;
05/20/2005 (5:11 pm)
Yup. It's low-level, and deliberately so. Every time someone tries to implement something high-level, it doesn't work out as intended, and doesn't provide the script developer the access that he wants. Or, as it were, that *I* want. [Good luck using ODEItem to create a flexible chain, for example]Akio was posting comments like "what do you want this to work with?", and people would reply "ragdolls" or "vehicles". Well, doing it this way, y'all can use it with whatever you want it to.
No, it's not in TGE yet, just T2D. TGE is next on my list after I release a resource for T2D. My intention is to create a resource that's basically a differently-implemented ODEItem, and go for there.
Gary (-;
#5
Just wanted to pop in and encourage you to keep going on this. I'll look forward to seeing what you get going!
05/21/2005 (11:41 am)
Hi Gary,Just wanted to pop in and encourage you to keep going on this. I'll look forward to seeing what you get going!
#6
Gary (-;
05/21/2005 (4:48 pm)
@Josh: Thank-you! It feels good to have an actual GG employee encouraging me :-)Gary (-;
#7
edit: Oh yeah, and then I also posted up at the top of the thread, too. :P
05/21/2005 (7:46 pm)
Not to cast aspersions on Josh's contribution, but, er, you've been talking to me on IRC about it off and on for at least a week. ;) I'm pretty sure I was saying positive things about it all that time...edit: Oh yeah, and then I also posted up at the top of the thread, too. :P
#8
Gary (-;
05/21/2005 (8:03 pm)
@Ben: Sorry, I suck. Guess this goes to show how much attention I'm paying. I greatly appreciate your support, too!Gary (-;
#9
05/22/2005 (3:52 pm)
No worries. I know how it is when you get into codemode and don't notice important things. ;)
#10
Random Code Drop. Small C++ additions, and re-worked demo to have way fewer, more visible, bodies.
I've added the ability to get body rotations (matrix3, quaternion, and euler angles), and changed the demo around a bit. I can't make sound work right on my powerbook, so ignore the background on the demo for the time being, if you try it.
You know what's really annoying? When you discover that you've spent hours trying to fix the wrong problem. My collision depth was accurate enough to be doing the right thing; my ODE settings were basically in a place where the collisions were allowed to be pretty squishy; squishy enough that under lots of force, they'd squish right through. Massive thanks go to King Tut BoB for his help on that whole thing.
Gary (-;
05/24/2005 (9:56 pm)
icculus.org/~chunky/stuff/odescript/odescript-2005-05-24.tar.gzRandom Code Drop. Small C++ additions, and re-worked demo to have way fewer, more visible, bodies.
I've added the ability to get body rotations (matrix3, quaternion, and euler angles), and changed the demo around a bit. I can't make sound work right on my powerbook, so ignore the background on the demo for the time being, if you try it.
You know what's really annoying? When you discover that you've spent hours trying to fix the wrong problem. My collision depth was accurate enough to be doing the right thing; my ODE settings were basically in a place where the collisions were allowed to be pretty squishy; squishy enough that under lots of force, they'd squish right through. Massive thanks go to King Tut BoB for his help on that whole thing.
Gary (-;
#11
Another random code drop. This time it's just the C++, and I've pretty much added all the functions I intend to, along with modifying the API so that as well as taking (x, y, z), it can also take ("x y z"); a much more torquescript-friendly way to do it.
Gary (-;
EDIT: Just to note, also, I've switched to working with TGE for the time being, isntead of T2D.
05/31/2005 (8:27 pm)
icculus.org/~chunky/stuff/odescript/odescript-2005-05-31.tar.gzAnother random code drop. This time it's just the C++, and I've pretty much added all the functions I intend to, along with modifying the API so that as well as taking (x, y, z), it can also take ("x y z"); a much more torquescript-friendly way to do it.
Gary (-;
EDIT: Just to note, also, I've switched to working with TGE for the time being, isntead of T2D.
#12
My understanding is that this basically just exposes the ODE API to TorqueScript. The user can then glue things together to get the physical representation they're looking for. I figure you haven't gotten this far, but how do you see this working in a client/server setup?
05/31/2005 (8:48 pm)
First I really appreciate you doing this integration Gary.My understanding is that this basically just exposes the ODE API to TorqueScript. The user can then glue things together to get the physical representation they're looking for. I figure you haven't gotten this far, but how do you see this working in a client/server setup?
#13
Yes, this currently just exposes the ODE API to Torquescript at the moment. I've added some helper functions, too, that weren't previously avialable in ODE.
And yes, this is currently glue.
As client/server, I've gotta be honest, I've not properly thought it through. I remember seeing a book a while ago, "The Zen of Network Physics" or some such. I suspect that before I make any sweeping statements regarding this, I should read up on the subject :-)
Currently, I'm working towards creating a resource "ODEThing" or something. Basically, ODEItem, but reimplemented so it's easy to use. ODEItem doesn't do anything clever, client<->server, so I won't feel too bad about it.
So, uh, lots of words later, "I don't really have an answer to that question". I know somewhere between squat and jack about torque network stuff at the moment, so it's all a learning experience.
Gary (-;
05/31/2005 (9:10 pm)
@Tom: Thanks!Yes, this currently just exposes the ODE API to Torquescript at the moment. I've added some helper functions, too, that weren't previously avialable in ODE.
And yes, this is currently glue.
As client/server, I've gotta be honest, I've not properly thought it through. I remember seeing a book a while ago, "The Zen of Network Physics" or some such. I suspect that before I make any sweeping statements regarding this, I should read up on the subject :-)
Currently, I'm working towards creating a resource "ODEThing" or something. Basically, ODEItem, but reimplemented so it's easy to use. ODEItem doesn't do anything clever, client<->server, so I won't feel too bad about it.
So, uh, lots of words later, "I don't really have an answer to that question". I know somewhere between squat and jack about torque network stuff at the moment, so it's all a learning experience.
Gary (-;
#14
05/31/2005 (11:52 pm)
Propely networked physics are... uh... exciting. You will know fear, you will know pain, and then... you will understand networked physics.
#15
Gary (-;
05/31/2005 (11:54 pm)
Bwaha. I still won't actually understand network physics, even after the pain and fear subside. But I'll at least have a small idea of how much I don't know. Because that's why it's the "Zen of Network Physics", right?Gary (-;
#16
I'm more concerned with the high level implementation of client/server physics when your just exposing the physics API to script like this. Who holds the physics state on the client? Who holds it on the server? What objects take care of sending the server state to the client?
At first this type of implementation sounds much more flexible and reusable as the physics objects are loosely coupled to the shape objects.
06/01/2005 (12:00 am)
Well i know the basics and that getting it all right is quite difficult. I'm more concerned with the high level implementation of client/server physics when your just exposing the physics API to script like this. Who holds the physics state on the client? Who holds it on the server? What objects take care of sending the server state to the client?
At first this type of implementation sounds much more flexible and reusable as the physics objects are loosely coupled to the shape objects.
#17
06/01/2005 (12:10 am)
Awesome stuff, would love to see this through. Keep up the good work!
#18
icculus.org/~chunky/stuff/odescript/odescript-2005-06-07.tar.gz
There's a little more information in there. You'll have to edit torque_ver.h to reflect which flavors of Torque you're compiling against, if you want a few bonus features. Leaving it alone won't hurt anything.
There's also some example torquescript in there that shows bare-bones setup for T2D, and partial TGE. Look forward to more on its way.
I'd still kill for anyone who'll send me code that goes in the obvious spot here:
Primarily I've been working with TGE recently, though, so T2D stuff might trail for a while. I've been looking into ways to separate client and server, and basically what it comes down to is I think I've got a few neat ideas to get it working, but in the end I just don't have sufficient understanding at the moment of how torque does stuff.
Gary (-;
06/07/2005 (8:05 pm)
Mostly because I previously complained about other people's ODE work dropping into the ether:icculus.org/~chunky/stuff/odescript/odescript-2005-06-07.tar.gz
There's a little more information in there. You'll have to edit torque_ver.h to reflect which flavors of Torque you're compiling against, if you want a few bonus features. Leaving it alone won't hurt anything.
There's also some example torquescript in there that shows bare-bones setup for T2D, and partial TGE. Look forward to more on its way.
I'd still kill for anyone who'll send me code that goes in the obvious spot here:
ConsoleFunction(CollisionDepth2D, S32, 4, 4,
"(%src, %dst) "
"Depth of collision between two fxSceneObject2Ds") {
argc; argv;
fxSceneObject2D *src,*dst;
src = (fxSceneObject2D *)Sim::findObject(dAtoi(argv[2]));
dst = (fxSceneObject2D *)Sim::findObject(dAtoi(argv[3]));
if(NULL == src || NULL == dst) {
return -1;
}
return 3; // FIXME FIXME OH PLEASE GOD FIXME
}Primarily I've been working with TGE recently, though, so T2D stuff might trail for a while. I've been looking into ways to separate client and server, and basically what it comes down to is I think I've got a few neat ideas to get it working, but in the end I just don't have sufficient understanding at the moment of how torque does stuff.
Gary (-;
#19
06/08/2005 (10:02 am)
This is great stuff man, really appreciate all the work you've put into it! that function is a stumper too =/ hopefully I can get in and try a few things.
#20
06/08/2005 (11:47 am)
As soon as i can get some other stuff off my plate i'll start doing a test integration of your ODE stuff. Keep it up... i really appreciate people in the community taking on these sorts of tasks!
Associate Kyle Carter