ODEScript New Thread
by Gary "ChunkyKs" Briggs · in Torque Game Engine · 08/08/2006 (11:29 am) · 99 replies
Well, it's about a year on since I last was really posting stuff, so I thought I'd start a new thread.
From my .plan just now www.garagegames.com/blogs/20342/11050
Here's some code:
icculus.org/~chunky/stuff/odescript/oderocks-2006-08-08.tar.gz
icculus.org/~chunky/stuff/odescript/odescript-2006-08-08.tar.gz
ODEScript is the C++ code. ODERocks is a mod.
If you want the crossbow bolt thing to work, you'll need to edit projectile.cc and add StaticShapeObjectType to the Projectile::csmStaticCollisionMask at the top of the file.
In-game, hold down the C key to see the little physics UI. If you're on a real client instead of a listen server, the only UI widgets that will work properly are gravity [all directions], and the add rock/add link buttons.
Gary (-;
From my .plan just now www.garagegames.com/blogs/20342/11050
Here's some code:
icculus.org/~chunky/stuff/odescript/oderocks-2006-08-08.tar.gz
icculus.org/~chunky/stuff/odescript/odescript-2006-08-08.tar.gz
ODEScript is the C++ code. ODERocks is a mod.
If you want the crossbow bolt thing to work, you'll need to edit projectile.cc and add StaticShapeObjectType to the Projectile::csmStaticCollisionMask at the top of the file.
In-game, hold down the C key to see the little physics UI. If you're on a real client instead of a listen server, the only UI widgets that will work properly are gravity [all directions], and the add rock/add link buttons.
Gary (-;
#42
My setup right now is as I described above; I downloaded the ode 0.7 source zip, "./configure && make && sudo make install" it as described above. I didn't need to copy anything in the the torque SDK dir, other than ODEScript source.
If Capped cylinders explcitly was the problem, you can actually reimplement them using the other function I showed above. Are you missing what looks like *all* symbols?
I'm also confused by these two quotes:
Do you want to link statically or dynamically? Where is the library installed? Did you copy files straight out of ODE?
Gary (-;
10/31/2006 (3:18 pm)
Which version of ODE do you have? How did you build it?My setup right now is as I described above; I downloaded the ode 0.7 source zip, "./configure && make && sudo make install" it as described above. I didn't need to copy anything in the the torque SDK dir, other than ODEScript source.
If Capped cylinders explcitly was the problem, you can actually reimplement them using the other function I showed above. Are you missing what looks like *all* symbols?
I'm also confused by these two quotes:
Quote:
(and libode.a in /Torque Game Engine 1.5 SDK/lib/libode.a)
Quote:
I get other unknown symbols when I remove the .dylib
Do you want to link statically or dynamically? Where is the library installed? Did you copy files straight out of ODE?
Gary (-;
#43
10/31/2006 (4:36 pm)
I installed ode by running the same commands you did, then moving my include files to engine/ode/ and moved libode.a to the lib folder and added it all to my project file, I put it in Torque SDK because I wanted to keep it all in one place. I think I want static linking and I'm going to try your method of leaving the ode files where they install themselfs and will post results.
#44
More unknown symbols, different though, it also complained when I removed my engine/ode directory.
10/31/2006 (5:02 pm)
Failed!More unknown symbols, different though, it also complained when I removed my engine/ode directory.
cd "/Users/alex/Code/Torque/Torque Game Engine 1.5 SDK/Torque SDK/xcode"
setenv MACOSX_DEPLOYMENT_TARGET 10.2
setenv NEXT_ROOT /Developer/SDKs/MacOSX10.3.9.sdk
/usr/bin/g++-3.3 -o /Users/alex/Code/Torque/Torque\ Game\ Engine\ 1.5\ SDK/Torque\ SDK/xcode/build/torque_xcode_2_2_UB.build/Default/Torque-MacCarb-Release.build/Objects-normal/ppc/Torque\ Demo\ OSX -L../example -L/usr/local/lib -L/Users/alex/Code/Torque/Torque\ Game\ Engine\ 1.5\ SDK/Torque\ SDK/xcode -L/Users/alex/Code/Torque/Torque\ Game\ Engine\ 1.5\ SDK/Torque\ SDK/xcode/../engine/ode -L/Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/gcc/darwin/3.3 -F../example -F../lib/openal/macosx -F../lib/xiph/macosx -filelist /Users/alex/Code/Torque/Torque\ Game\ Engine\ 1.5\ SDK/Torque\ SDK/xcode/build/torque_xcode_2_2_UB.build/Default/Torque-MacCarb-Release.build/Objects-normal/ppc/Torque\ Demo\ OSX.LinkFileList -framework AGL -framework Carbon -framework OpenGL -framework CoreFoundation -framework DrawSprocket -framework OpenAL -framework Ogg -framework Vorbis -framework Theora -framework ApplicationServices -framework Cocoa -framework Accelerate -arch ppc -prebind -Wl,-Y,1455 -mmacosx-version-min=10.2 -lode -lz -Wl,-syslibroot,/Developer/SDKs/MacOSX10.3.9.sdk
ld: warning -L: directory name (/Users/alex/Code/Torque/Torque Game Engine 1.5 SDK/Torque SDK/xcode/../engine/ode) does not exist
ld: warning prebinding disabled because dependent library: @executable_path/../Frameworks/Theora.framework/Versions/A/Theora is not prebound
ld: Undefined symbols:
_fprintf$LDBLStub
_vfprintf$LDBLStub
_printf$LDBLStub
__ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base
__ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base
__ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_
___cxa_atexit
/usr/local/lib/libode.a(libode_a-error.o) reference to undefined _fprintf$LDBLStub
/usr/local/lib/libode.a(libode_a-error.o) reference to undefined _vfprintf$LDBLStub
/usr/local/lib/libode.a(libode_a-misc.o) reference to undefined _fprintf$LDBLStub
/usr/local/lib/libode.a(libode_a-lcp.o) reference to undefined _printf$LDBLStub
/usr/local/lib/libode.a(libode_a-convex.o) reference to undefined __ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base
/usr/local/lib/libode.a(libode_a-convex.o) reference to undefined __ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base
/usr/local/lib/libode.a(libode_a-convex.o) reference to undefined __ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_
/usr/local/lib/libode.a(libode_a-convex.o) reference to undefined _fprintf$LDBLStub
/usr/local/lib/libode.a(libode_a-timer.o) reference to undefined _fprintf$LDBLStub
/usr/local/lib/libode.a(libOPCODE_a-OPC_MeshInterface.o) reference to undefined ___cxa_atexit
/usr/local/lib/libode.a(libode_a-collision_trimesh.o) reference to undefined ___cxa_atexit
/usr/local/lib/libode.a(libOPCODE_a-IceRandom.o) reference to undefined ___cxa_atexit
ld: warning -L: directory name (/Users/alex/Code/Torque/Torque Game Engine 1.5 SDK/Torque SDK/xcode/../engine/ode) does not exist
ld: warning prebinding disabled because dependent library: @executable_path/../Frameworks/Theora.framework/Versions/A/Theora is not prebound
ld: Undefined symbols:
_fprintf$LDBLStub
_vfprintf$LDBLStub
_printf$LDBLStub
__ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base
__ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base
__ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_
___cxa_atexit
/usr/local/lib/libode.a(libode_a-error.o) reference to undefined _fprintf$LDBLStub
/usr/local/lib/libode.a(libode_a-error.o) reference to undefined _vfprintf$LDBLStub
/usr/local/lib/libode.a(libode_a-misc.o) reference to undefined _fprintf$LDBLStub
/usr/local/lib/libode.a(libode_a-lcp.o) reference to undefined _printf$LDBLStub
/usr/local/lib/libode.a(libode_a-convex.o) reference to undefined __ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base
/usr/local/lib/libode.a(libode_a-convex.o) reference to undefined __ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base
/usr/local/lib/libode.a(libode_a-convex.o) reference to undefined __ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_
/usr/local/lib/libode.a(libode_a-convex.o) reference to undefined _fprintf$LDBLStub
/usr/local/lib/libode.a(libode_a-timer.o) reference to undefined _fprintf$LDBLStub
/usr/local/lib/libode.a(libOPCODE_a-OPC_MeshInterface.o) reference to undefined ___cxa_atexit
/usr/local/lib/libode.a(libode_a-collision_trimesh.o) reference to undefined ___cxa_atexit
/usr/local/lib/libode.a(libOPCODE_a-IceRandom.o) reference to undefined ___cxa_atexit
Build failed (1 error, 2 warnings)I followed your instructions and it still won't compile. Do you think I did anything wrong?
#45
Try adding a "-lSystemStubs" to your "Other Linking Flags" line? It really sucks that you'd need that, I'm not sure why you would. For that matter, ODE calling the printf family is kinda odd too.
Gary (-;
10/31/2006 (5:18 pm)
This guy had that problemTry adding a "-lSystemStubs" to your "Other Linking Flags" line? It really sucks that you'd need that, I'm not sure why you would. For that matter, ODE calling the printf family is kinda odd too.
Gary (-;
#46
Could you send me your libode.a file? Maybe my computer
Well, I wish you luck in solving the annoying ode problems that plaque me...
edit:bolding tags
10/31/2006 (5:49 pm)
Thanks for trying, but it still spews out the same errors :(Could you send me your libode.a file? Maybe my computer
Quote:isn't building it right. I wish there was a Mac OSX framework that I could just add, but the ode website never mentioned one...
using XCode 2.4 on an iMac(PPC) running OSX 10.4.8
Well, I wish you luck in solving the annoying ode problems that plaque me...
edit:bolding tags
#47
Standby for results...
Results:
Same as problem before trying adding the new linker flag...
I could send my project file if it would do any good...
10/31/2006 (6:07 pm)
Now going for another try completly reinstalling 1.5 and following your directions...Standby for results...
Results:
Same as problem before trying adding the new linker flag...
I could send my project file if it would do any good...
#48
I don't know how, but I just remade ODE, didn't remove the .dylib and it compiled!
Thanks for all your help, I can't wait to integrate it into my current game.
11/01/2006 (3:55 am)
IT WORKS!!!!!!!!!I don't know how, but I just remade ODE, didn't remove the .dylib and it compiled!
Thanks for all your help, I can't wait to integrate it into my current game.
#49
Woo! So the problem was likely an ODE compiling issue or something?
Gary (-;
11/01/2006 (10:48 am)
Quote:IT WORKS!!!!!!!!!
I don't know how, but I just remade ODE, didn't remove the .dylib and it compiled!
Thanks for all your help, I can't wait to integrate it into my current game.
Woo! So the problem was likely an ODE compiling issue or something?
Gary (-;
#50
11/01/2006 (12:29 pm)
I guess, when I compiled it my torque files compiled twice for some reason, maybe it was a one time thing, but I got it to compile, now to test it out.
#51
I just decided to try out ODE by using oderocks so I installed it and it just wouldn't work. I checked the console and it said that odeshape didn't exist. I looked and realized that ode was being ignored by the project, so I added it and now I have a mass of unknown symbols, starting with
Please help, it seems to be in that second warning, telling me I can't load the lib.
11/01/2006 (4:32 pm)
!!!!!!!!I just decided to try out ODE by using oderocks so I installed it and it just wouldn't work. I checked the console and it said that odeshape didn't exist. I looked and realized that ode was being ignored by the project, so I added it and now I have a mass of unknown symbols, starting with
/usr/bin/ld: warning -prebind ignored because MACOSX_DEPLOYMENT_TARGET environment variable greater or equal to 10.4 /usr/bin/ld: warning /usr/local/lib/libode.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) **changes libode.dylib to libode.a when I remove libode.dylib _dJointAttach _dJointCreateContact _dBodyAddForce _dBodyAddTorque _dBodyCreate _dBodyDestroy _dBodyGetAngularVel _dBodyGetLinearVel _dBodyGetPosition _dBodyGetQuaternion _dBodySetLinearVel _dBodySetPosition _dBodySetQuaternion _dBodyAddForceAtPos _dBodyAddForceAtRelPos _dBodyAddRelForce .......................Looks like I'm further behind than when I started... :(
Please help, it seems to be in that second warning, telling me I can't load the lib.
#52
You've got ODE built for just PPC, and the linking occurring there is causing problems because it wants to build an intel flavor of the torque binary.
Open up your Torque build settings, and disable x86 building.
Gary (-;
11/01/2006 (4:57 pm)
You have a PPC machine, by any chance?You've got ODE built for just PPC, and the linking occurring there is causing problems because it wants to build an intel flavor of the torque binary.
Open up your Torque build settings, and disable x86 building.
Gary (-;
#53
YAY!!!
It works! If I put the .dylib back it works without the system stubs and even if I remove it, it works with the system stubs. Thanks a bunch! One last question, is it just me, or is ode rather jerky? Is there some setting I can modify to make it smoother?
THANKS A BUNCH!
11/01/2006 (5:01 pm)
Yes, as previously mentioned I have an iMac G5 ppc and thanks, the library works, but still some undefined symbols liek beforecd "/Users/alex/Code/Torque/Torque Game Engine 1.5 SDK/Torque SDK/xcode"
setenv MACOSX_DEPLOYMENT_TARGET 10.2
setenv NEXT_ROOT /Developer/SDKs/MacOSX10.3.9.sdk
/usr/bin/g++-3.3 -o ../example/Torque\ Demo\ OSX.app/Contents/MacOS/Torque\ Demo\ OSX -L../example -L/usr/local/lib -L/Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/gcc/darwin/3.3 -F../example -F../lib/openal/macosx -F../lib/xiph/macosx -filelist /Users/alex/Code/Torque/Torque\ Game\ Engine\ 1.5\ SDK/Torque\ SDK/xcode/build/torque_xcode_2_2_UB.build/Default/Torque-MacCarb-Release.build/Objects-normal/ppc/Torque\ Demo\ OSX.LinkFileList -framework AGL -framework Carbon -framework OpenGL -framework CoreFoundation -framework DrawSprocket -framework OpenAL -framework Ogg -framework Vorbis -framework Theora -framework ApplicationServices -framework Cocoa -framework Accelerate -arch ppc -prebind -Wl,-Y,1455 -mmacosx-version-min=10.2 -lode -lz -Wl,-syslibroot,/Developer/SDKs/MacOSX10.3.9.sdk
ld: warning prebinding disabled because dependent library: @executable_path/../Frameworks/Theora.framework/Versions/A/Theora is not prebound
ld: Undefined symbols:
_fprintf$LDBLStub
_vfprintf$LDBLStub
_printf$LDBLStub
__ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base
__ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base
__ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_
___cxa_atexit
/usr/local/lib/libode.a(libode_a-error.o) reference to undefined _fprintf$LDBLStub
/usr/local/lib/libode.a(libode_a-error.o) reference to undefined _vfprintf$LDBLStub
/usr/local/lib/libode.a(libode_a-misc.o) reference to undefined _fprintf$LDBLStub
/usr/local/lib/libode.a(libode_a-lcp.o) reference to undefined _printf$LDBLStub
/usr/local/lib/libode.a(libode_a-convex.o) reference to undefined __ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base
/usr/local/lib/libode.a(libode_a-convex.o) reference to undefined __ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base
/usr/local/lib/libode.a(libode_a-convex.o) reference to undefined __ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_
/usr/local/lib/libode.a(libode_a-convex.o) reference to undefined _fprintf$LDBLStub
/usr/local/lib/libode.a(libode_a-timer.o) reference to undefined _fprintf$LDBLStub
/usr/local/lib/libode.a(libOPCODE_a-OPC_MeshInterface.o) reference to undefined ___cxa_atexit
/usr/local/lib/libode.a(libode_a-collision_trimesh.o) reference to undefined ___cxa_atexit
/usr/local/lib/libode.a(libOPCODE_a-IceRandom.o) reference to undefined ___cxa_atexit
ld: warning prebinding disabled because dependent library: @executable_path/../Frameworks/Theora.framework/Versions/A/Theora is not prebound
ld: Undefined symbols:
_fprintf$LDBLStub
_vfprintf$LDBLStub
_printf$LDBLStub
__ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base
__ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base
__ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_
___cxa_atexit
/usr/local/lib/libode.a(libode_a-error.o) reference to undefined _fprintf$LDBLStub
/usr/local/lib/libode.a(libode_a-error.o) reference to undefined _vfprintf$LDBLStub
/usr/local/lib/libode.a(libode_a-misc.o) reference to undefined _fprintf$LDBLStub
/usr/local/lib/libode.a(libode_a-lcp.o) reference to undefined _printf$LDBLStub
/usr/local/lib/libode.a(libode_a-convex.o) reference to undefined __ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base
/usr/local/lib/libode.a(libode_a-convex.o) reference to undefined __ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base
/usr/local/lib/libode.a(libode_a-convex.o) reference to undefined __ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_
/usr/local/lib/libode.a(libode_a-convex.o) reference to undefined _fprintf$LDBLStub
/usr/local/lib/libode.a(libode_a-timer.o) reference to undefined _fprintf$LDBLStub
/usr/local/lib/libode.a(libOPCODE_a-OPC_MeshInterface.o) reference to undefined ___cxa_atexit
/usr/local/lib/libode.a(libode_a-collision_trimesh.o) reference to undefined ___cxa_atexit
/usr/local/lib/libode.a(libOPCODE_a-IceRandom.o) reference to undefined ___cxa_atexit
Build failed (1 error, 1 warning)I'll try the solution you posted earlier again, standby for results...YAY!!!
It works! If I put the .dylib back it works without the system stubs and even if I remove it, it works with the system stubs. Thanks a bunch! One last question, is it just me, or is ode rather jerky? Is there some setting I can modify to make it smoother?
THANKS A BUNCH!
#54
If the movement is smooth but the rotiation is jerky... long time problem, lemme know when you fix it.
If it makes your whole simulation run like molasses, then there's something wrong. If you're doing the chain in the sky thing, try turning off collisions.
If, uh, lessee, what's left. If movement seems smooth but ragged; Like, the objects are moving smoothly then jerking into a different place, try changing your world step and numworldsteps parameters. Smaller is better. Very high gravity setting may cause trauma, as will positive damping [Love adding energy to simulations]. Try just tweaking in the physics UI, there's a lot of stuff to mess with, there.
Gary (-;
11/01/2006 (5:20 pm)
When is it "jerky", and how is it "jerky"? If your objects seem to be jerking around, then you probably have clientside prediction turned off, which is a setting in the physics UI, or the console variable $pref::ODEPhysics::Client::EnableODEIf the movement is smooth but the rotiation is jerky... long time problem, lemme know when you fix it.
If it makes your whole simulation run like molasses, then there's something wrong. If you're doing the chain in the sky thing, try turning off collisions.
If, uh, lessee, what's left. If movement seems smooth but ragged; Like, the objects are moving smoothly then jerking into a different place, try changing your world step and numworldsteps parameters. Smaller is better. Very high gravity setting may cause trauma, as will positive damping [Love adding energy to simulations]. Try just tweaking in the physics UI, there's a lot of stuff to mess with, there.
Gary (-;
#55
11/01/2006 (5:26 pm)
Thanks for all the sugestions, it's probably the first two, also, how do you position the chain in the sky? It seems to come out of nowhere, generaly somewhat near me. And an update on the compiling, the stubs flag doesn't matter, but I need the .dylib . If I ever do get rotation to go faster I'll tell you, but right now I doubt I have anywhat near the amount of experience needed.
#56
Gary (-;
11/01/2006 (5:42 pm)
The chain in the sky is just part of a demo. There's a hardcoded start position somewhere in the relevant serverCmd. I don't generally anticipate people basing their game around ODERocks, it's mostly jsut there as a demo and as a cute physics UI for my own testing and the like.Gary (-;
#57
11/01/2006 (5:50 pm)
I know, it's just the way the video was presented it seemed to appear right where you were aiming. I have some cool ideas planned to test ode, I'll post links to any videos I make, thanks a again!
#58
I'd love to see any videos of stuff you do with this!
Gary (-;
11/01/2006 (5:54 pm)
Heh. It appeared right where I was aiming because I wanted the video to be of ODEScript, not me wandering around for five minutes looking for some rocks in the sky :-DI'd love to see any videos of stuff you do with this!
Gary (-;
#59
11/02/2006 (5:18 pm)
Do you have an intel version of both libraries for ODE? I was hoping to keep my game at least universal on the mac, maybe even Windows support. Also, you seem to have left out console code for auto-disabling, was this because it has problems with TGE or did you just choose not to add it?
#60
Regarding universal binary support;I don't have libraries offhand, but they're easy to make, by just adding the necessary platforms onto your gcc lines for everything. Or see if you can find a framework that magically does this. I don't have mine anymore, but RayG made it up for me. If he's still reading this thread, perhaps he can dredge it up.
And my personal experience is that compiles are faster if you just turn off the platform you're not actively developing at, then building universal and other plaforms when you're nearing the time you'd give it to someone else.
Gary (-;
11/02/2006 (6:42 pm)
Hm. I thought I had the whole API in there. There's a good chance I left it out and left ODE to do it's own thing on that front, though.Regarding universal binary support;I don't have libraries offhand, but they're easy to make, by just adding the necessary platforms onto your gcc lines for everything. Or see if you can find a framework that magically does this. I don't have mine anymore, but RayG made it up for me. If he's still reading this thread, perhaps he can dredge it up.
And my personal experience is that compiles are faster if you just turn off the platform you're not actively developing at, then building universal and other plaforms when you're nearing the time you'd give it to someone else.
Gary (-;
Torque Owner Richard_H
I downloaded my ode from soureforge.
Do you have anything all set-up (like the framework you mentioned was possible) you could send me? Any help would be greatly apreciated.