Game Development Community

ODEScript Demo

by Gary "ChunkyKs" Briggs · 04/19/2007 (1:11 pm) · 12 comments

I've been working on ODEScript again recently. I don't know if many people remember, but it's mostly an implementation of ODE, in Torque.

Image time! It's not great, but that's what happens when you take a static screenshot of a movie capture of a system whose entire value is being dynamic :-)
chunky.megastep.org/torque/korkballshot.jpegI have a few youtube videos up, here, here, here, and here.

Anyways. there's a small [44M] demo package of it, available at chunky.megastep.org/torque/.

The package contains Intel Linux, Intel Mac, and Windows builds. I build the Linux one on Ubuntu Edgy that's not set up to be a decent build box, so YMMV on other flavors of Linux.

To try it out, start the Stronghold mission, and hold down C or V in-game to get little menus of stuff to try.

If anyone tries this, please lemme know if it worked for you, and what system you're running.

Gary (-;

#1
04/19/2007 (1:24 pm)
hey I remember that :) Nice stuff.. downloading demo right now.
Looking forward for more

Btw, I'm too into "The mouse is the wrong way up" :) Inverted mouse is good!
#2
04/19/2007 (1:28 pm)
With ODE and Opcode being such an integral part of each other, and Opcode now being fairly workable in torque... Have you done any enhancements to your own ODE work by merging in Opcode as well?
#3
04/19/2007 (2:21 pm)
I remember this too, cool to see you're still at it!
#4
04/19/2007 (3:06 pm)
@Erik: I still didn't really look into replacing torque's normal collisions. I still haven't really felt the urge. Better collisions would fix several problems I have [including performance ones, according to my profiler], but would also be a LOT of work. I still haven't crossed the line where I feel it's actually neccessary.

There's the polysoup addon here: tdn.garagegames.com/wiki/Torque_Shader_Engine/PolySoupAddon, but the licensing with it has a couple things that I don't like, and says "If you do not agree to the license terms, do not download". So I never downloaded it :-).

I was recently pointed at this resource, which apparently makes Torque's collision code better. I'm trying it at the moment, but I see no real visible difference so far.
EDIT: Hey, a quick diff makes it look like that resource got merged in a recent patch. Which would explain why I didn't see a difference :-)

Gary (-;
#5
04/19/2007 (10:44 pm)
Tried out the demo Gary! It's awesome!

I notice a little big of choppiness but that may just be my computer. I always get poor framerates in Stronghold.

Fantastic work though! You have a shrine of worship next to Alex Scarborough's in my basement. :)
#6
04/20/2007 (12:36 am)
Haha love the one with chain attached to kork :D
Awesome stuff!
#7
04/20/2007 (7:21 am)
Excellent. I played with the Mac OS X build. Your freaky flightsim-style controls are nuts, but overall, it works great. Timely for me... I was just playing with the RigidShape resource for the first time this week. ODE rocks, indeed.

It was tough tweaking gravity so the rocks seemed to fall at the right rate -- maybe there should be some relationship between the current physical zone's gravity and the ODE gravity setting. It was also fun to play with sideways gravity.

Sometimes the cubes don't really sit on the terrain. There's a gap between them and the terrain. Is that a DTS collision box issue? When I place rocks in the mission editor, they don't work (i.e. gravity doesn't act on them). It's the opposite problem of rigidshape -- it's lousy for trying to place rigidshape objects into initial positions.
#8
04/20/2007 (9:03 am)
Hey Gury, glad to know you back to work on that.

By the way, im still noticing choppiness on that. Its better than the previous version, but it still there. Any news about that?
#9
04/20/2007 (11:01 am)
@Rob:
Quote:Sometimes the cubes don't really sit on the terrain. There's a gap between them and the terrain. Is that a DTS collision box issue? When I place rocks in the mission editor, they don't work (i.e. gravity doesn't act on them). It's the opposite problem of rigidshape -- it's lousy for trying to place rigidshape objects into initial positions.

This is two things. First is that like rigidshape, I've tweaked the collisions with a "tolerance". It's a slider in the furthest right tab in the physics UI. If you set the tolerance to zero [as it "should be"], the shapes just fall through the ground :-/

Second, IIRC the collision mesh is actually a teensy bit bigger than visible mesh :-)

Placing rocks in the mission editor is a stack of code I wrote a long long time ago, and may not work now. It's not as simple as just sticking a rock in there...


@Gustavo:
The timing thing I'm working on still. It requires a lot of additional code, and is still in the category of "I hope it works".

At least one person I speak to regularly on this topic reckons it'll never work... 'course, he also said my entire approach would never create anything resembling anything workable ['sup Noolie].

Gary (-;
#10
08/14/2007 (7:28 am)
That's just brilliant !
I have a problem though : I am trying to create dynamically a joint between the player and an ODE object, this is supposed to occur whenever the player collides with the mentioned object. However, whenever I collide with the object, Torque crashes and throws me this error :

"Bodies and joints must be in the same world"

Here is the function that is called in ODEobject::onCollision :

function graspObject(%client,%target,%user) {

if(!isObject(odeuserchain)) {
new ScriptObject(odeuserchain) {
links=0;
};
odeuserchain.jointgroup = new tdJointGroup() { datablock = odejointgroupdata; };


%jnt = new tdJoint() {
datablock = odejointdata;
};
%jnt.CreateBall($odeworld, odeuserchain.jointgroup);
%jnt.Attach(0, %user);
echo("attaching user and world ...");
}

MissionCleanup.Add(%jnt);

%jnt = new tdJoint() {
datablock = odejointdata;
};
%jnt.CreateBall($odeworld, odeuserchain.jointgroup);
%jnt.Attach(%target, %user);

echo("attaching user and target ...");

MissionCleanup.Add(%jnt);
}


Do you have any idea how to fix that ?
Thanks !
#11
10/06/2007 (8:15 am)
I have the integration nearly complete, however when I add a box or rock to the world (using the "c" and "v" menus), and shoot it with a crossbow, the bolt goes right through the object. I also noticed that the rocks do not fall all the way to the ground when I spawn them. I'm sure these issues are easy to fix, but I'm a complete n00b with Torque, and absolutely, 100% lost at the moment. Any thoughts?

Brett
#12
10/06/2007 (8:32 am)
Gar, nevermind! I found my problem in projectile.cc