Game Development Community

dev|Pro Game Development Curriculum

ODEItem v0.10

by Pascal · 01/04/2004 (1:38 pm) · 130 comments

Edit: 1/9/04 -- updated to 2nd Release w/ multiplayer and a couple more config features (see docs)
You can download the file from HERE (it was too large with the included .lib files for GG)

see the README.html file for complete installation usage instructions.

A number of short engine changes are required to get it working (three have changed since release 1, see docs)

Included are compiled versions of the .lib files for ODE as well as the slightly modified source.

Take a look at the following Movie Zipfile for a demo (I think its compressed with DivX..)

For those of you familiar with ODE I decided to use the torque engine for collision mechanism instead of the one built into ODE. While this is probably a performance hit (or maybe not, I don't really know enough to say) it does make life much easier as any DTS file with collision meshes should work correctly with the rest of the world including the terrain.

The code will need some modifications to make it useful so check out the ODE Homepage for some more info on the engine. I need to do a revamp of the code an clean up my initial confusion a little so I will probably release a new version in a couple of weeks.

Included are a crate and an trash can to get you started.

Have fun throwing crates around (I did)..
My next step is to try to get some rag dolls working but that may be a little while.

-Pascal
#61
03/07/2004 (12:21 pm)
Hi
I've got a few problem with installing the ODE example.
I got all the same problems as Westy, but as soon as I cleared them I just got massive linker errors, like these:
ODEWorld.obj : error LNK2019: unresolved external symbol ODEItem.obj : error LNK2019: unresolved external symbol

I am using Visual .Net 2003.
Can anyone give me a hint?

another question:
Is the additional code from F.W. Hardijzer included in the example, or do I have to add it afterwards (yes, I know, this might be a pretty dum question)

kind regards
- Rasmus
#62
03/08/2004 (5:32 pm)
@Rasnmus,

Did you make sure the ODE lib file is getting linked in correctly?
Also did you add ODEItem.cc to you project file (I know that sounds dumb but I can't figure out what is actually unresolved) Do you have any more output?

Also, the F.W. Hardijzer stuff is not in zip.

-Pascal
#63
03/08/2004 (6:34 pm)
@Pascal

Yes I overlooked something.. the lib didn't get linked correctly..
Thanks for the help..
I hope I can make the rest work out now :)

- Rasmus
#64
03/13/2004 (3:39 pm)
I'm getting errors when compiling:

[source]ODEItem.cc
H:\development\torque\torque\engine\game\ODEItem.cc(196) : error C2664: 'dGeomSetBody' : cannot convert parameter 1 from 'unsigned int' to 'struct dxGeom *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
H:\development\torque\torque\engine\game\ODEItem.cc(759) : error C2065: 'dWorldImpulseToForce' : undeclared identifier
H:\development\torque\torque\engine\game\ODEItem.cc(916) : error C2440: '=' : cannot convert from 'unsigned int' to 'struct dxGeom *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
H:\development\torque\torque\engine\game\ODEItem.cc(917) : error C2440: '=' : cannot convert from 'unsigned int' to 'struct dxGeom *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
ODEWorld.cc
../engine\math/mConstants.h(9) : warning C4005: 'M_PI' : macro redefinition
d:\sdk\external\include\ode/common.h(55) : see previous definition of 'M_PI'
H:\development\torque\torque\engine\game\ODEWorld.cc(60) : error C2665: 'findObject' : none of the 2 overloads can convert parameter 1 from type 'struct dxGeom *'
Error executing cl.exe.

torqueDemo.exe - 5 error(s), 1 warning(s)
[/source]
#65
03/15/2004 (4:23 pm)
@Mike:

Are you using the included lib or a different version of ODE?
Some of those errors look like they stem from changes I made to typedefs.

-Pascal
#66
03/15/2004 (4:26 pm)
I *think* I'm using the included lib.

Edit: Yup, looks like I am using the included lib.
#67
03/15/2004 (4:39 pm)
Make sure the ode/common.h that's getting pulled in has the old typedef for dGeomID commented out (should be include/ode/common.h -- around line 179) like below:
//typedef struct dxGeom *dGeomID;
typedef unsigned int dGeomID;

If that's ok, do a find in files in all of torque to make sure you are not accidently pulling in the wrong header.

-Pascal
#68
03/15/2004 (4:45 pm)
It has:

//typedef struct dxGeom *dGeomID;
typedef unsigned int dGeomID;
#69
03/15/2004 (4:55 pm)
I had a rogue copy somewhere, but not I have a link error. Back later!

Linking...
ODE-dbg.lib(ode.obj) : error LNK2001: unresolved external symbol _dGeomGetBodyNext
ODE-dbg.lib(step.obj) : error LNK2001: unresolved external symbol _dGeomGetBodyNext
ODE-dbg.lib(ode.obj) : error LNK2001: unresolved external symbol _dGeomMoved
ODE-dbg.lib(step.obj) : error LNK2001: unresolved external symbol _dGeomMoved
../example/torqueDemo_DEBUG.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

So annoying!
#70
03/15/2004 (6:03 pm)
ODEWorld.cc has those defined in it. Make sure you've added it to the project (Also make sure ODEWorld is pulling in the right ode/common.h as well).
-Pascal
#71
03/15/2004 (10:49 pm)
@Pascal: how hard would it be to get Vehicles interact with the ODE items, too?
What would be really awesome is to get the player to move on the items so that you could use crates to reach higher parts of the map etc.
Finally, I have a strange behaviour with saving ODE Items in the mission... they *seem* to be saved, but they are "invisible" and without collision after you load the mission... you have to move them with the mouse to get them "re-activated"... did you see this problem yet?
Thx for the great work so far! :)
#72
03/16/2004 (4:49 pm)
I definitely have ODEWorld in my project.
#73
03/30/2004 (11:25 am)
Did anyone ever get this working for multi player? I'd be very interested to try it out.
#74
04/15/2004 (9:38 pm)
I compiled it without any errors, but when I try to use the included test objects and the script, I'm getting these errors in the console. Any solutions?

==>createODEcan();
Object 'ODECan' is not a member of the 'GameBaseData' data block class starter.fps/server/scripts/ODEItem.cs (0): Register object failed for object (null) of class ODEItem.
==>createODEItem();
Object 'ODEBox' is not a member of the 'GameBaseData' data block class starter.fps/server/scripts/ODEItem.cs (27): Register object failed for object (null) of class ODEItem.
#75
04/16/2004 (5:08 pm)
Updates/News anyone?
#76
04/20/2004 (12:08 am)
Scott, its a script problem, in the ODEItem.cs
Make sure its pointing to the shape right.
shapeFile = "~/data/shapes/crates/crate1.dts";

Actually, that wasnt the problem, it was coming up with wierd script errors for some reason, syntax, i had to delete the area with the syntax problem and rewrite it to fix.
#77
04/29/2004 (8:32 am)
The file download link seems dead now. Any clue for this?
#78
04/29/2004 (9:16 am)
@Steven: my bargin basement hosting site may just have been down, the link seems to work again.
#79
04/30/2004 (12:04 am)
What changes were made to ODE for this? Im trying to update the lib.
#80
04/30/2004 (7:26 am)
@Luke,

I think that the only change is in ode/common.h, changing the dGeomID typedef (~line 179):
//typedef struct dxGeom *dGeomID;
typedef unsigned int dGeomID;

If you then compile in only the files mentioned at the end of the readme, you should be good to go. -p