Game Development Community

Plan for Dylan Sale

by Dylan Sale · 11/29/2003 (8:08 am) · 4 comments

It started off well, I made good progress in a day or two. I have a basic implementation working. As you can see. But, the multiplayer side was not working as well as I would have hoped, so I redesigned my DynamicObject class to be more like the vehicle class in terms of net use and interpolation, but I have found that this approach is a huge network hog, and even with ther server/client in the same process, it lags up the net code something fierce with any more than 10 or so DynamicObjects. Im sure there is a much better way of doing this, because at the moment, I am just sending the transform of the object each update (if it is enabled, ie has moved recently).

I can see why it would lag if it were a networked game (ie playing over the net or something), but I dont know why it does when the server/client are in the same instance. This is really annoying me, because it severly limits the number of ODE objects that can be moving in a game to at most 10, which I suppose is a fair few, but I know ODE is much more capable. But with properly placed objects, ie not a lot of stacking, and having large distances between objects (so ones that were moving will stop before the player/s move another one) it could work.


Well, that is all fine and good, but all they collide with at the moment is each other and the plane I have on the xy plane. I need to get terrain collisions working, then interiors and static shapes.

ODE has a limitation with the current release. Any object that is not a box, sphere or capsule, must be a TriMesh (ie a triangle soup, used for collision detection). But 2 trimeshes cant collide with each other at the moment, so only the terrain/interiors/staticshapes can use the trimesh, but any other objects (ie DynamicObjects) have to be made out of the primitive (see above) shapes (this is all the collision mesh in ODE, by the way, you can use any dts to render the DynamicObject), so that they can collide with the terrain etc.

This brings up the issue that is currently busting my balls, I have to get triangle meshes for the terrain collision stuff, but the getPolyList method only returns polygons (as far as i can tell) and I am stumped on how to get the triangles out of it. I think I will need to subclass ConcretePolyList, but who knows. Im tired at the moment, so all may be clear in the morning.

Even when I get the triangles, I dont really know how to use the TriMesh type in ODE, because its only new, there is a brief outline in the documentation, but no actual working examples.

A good thing is that if I can figure out a way of extracting the collision triangles from the terrain, then I think I can use that same class to extract them from pretty much anything that has collisions (as they all have a buildPolyList method).

I dont know weather I will release this free, or as a code pack. I have spent and will spend many more hours getting this to work, and it is largely because I was bored. If I can get some compensation for that to get my parents off my back about getting a job, so I can make more cool stuff, that would be awesome.

But I just read Davis's .plan on this very topic and I agree..

Maybe I can release it free and add more features as people donate money.. ie I get $20 and Ill add terrain collisions etc.

I dont know, we will see what the future holds I suppose.

Wow, I have written a book, thats amazing. Hope it makes sense (if you actually read it all, then I congratulate you :D ).

Dylan

#1
11/29/2003 (8:34 am)
Same dilemma here for AI. I do think code-packs have value, but I do agree with DRS to an extent.

But seriously, this is an issue thats not going to stop me from working. Maybe in the end we should just have a barter system. If I have something you want, we can trade source codes.

Maybe thats a better system altogether. Might sound elitist of course, but having a "Ive got this code, I'm willing to swap for X" is maybe a useful idea.

anyway, enough plan hijack. Let us know how this effort goes Dylan, might save me some time :) I can live without terrain collisions, but the issue of performance does sound a bit strange.

Phil.
#2
11/29/2003 (11:12 am)
I got the world going into a trimesh ('cept for some quads on interiors)... And I'll probably fix that soon.

But my problem is, the damn things won't collide! At all! I can't get a sphere to hit the trimesh! It calls dCollide on the two objects but I never get contacts out.

This is very frustrating. And I also found what I think are some exciting bugs in the trimesh code, but we'll see. I'm pulling down the latest ODE CVS while I'm online, and I'll do some builds tonight of the test apps to see if it's me or them.

And as far as ragdoll goes, the thing crashes with something like 438 joints... I have no idea how it's getting that many.
#3
11/29/2003 (6:30 pm)
Wow, good stuff Ben, maybe i should just give up now :D
#4
11/10/2004 (12:27 pm)
This may be a really daft question, but I'm currently looking at modelling a vehicle in torque, and I'm using ODE. I've not yet got to the intergration step [between what I have now, and torque] yet, so I may be missing something obvious, but:

Why can't you just model the object in ODE, then use torque's collision handling [which, for eg in vehicles, gives you point, normal, material, and some other stuff], and simply make contact joints in ODE between the body you're animating and the body "0"? You needn't ever use ODE's collision handling at all, except for between bodies, right?

Of course, this is also my first real Torque projects, so I'll undoubtedly come up against substantial reasons this can't work... I've not looked at ANYTHING network-related in Torque yet, so by the sounds of it, that may be a substantial issue...

Gary (-;