Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Fun with ODE Physics

Author
Message
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 1st Nov 2009 19:13
Well make sure you have the DirectX SDK (I used the Oct. '06 version) and download the latest version of Ode (SVN - https://opende.svn.sourceforge.net/svnroot/opende/trunk).

Not sure if you have built the ode lib, but if you have and added the ode folder to the Tools->Options->VC++ Directories and its not working, then you may want to check Project->Properties->Linker->Input->Additional Dependencies for ode.lib. If you compiled the ode single lib it may name it as 'ode_single.lib' instead of 'ode.lib' so just change it to match up.

I you haven't compiled the ode library, then once you download the svn go into the build folder and run the premake4.exe in command prompt, there is some options you have to set but it should be self-explanatory. Once you do that a new folder should show up in the build folder. Then open the ode.vcproj and compile it, make sure you compile it to ReleaseSingleLib.

Hope this helps out.

Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 1st Nov 2009 19:33
Thanks for the info, I actually figured out my error, I forgot to change the runtime library to (/MT) when I built the ode_single.lib. I have your project building the DLL succesfully.
New question I tried to update from your SVN using tortise, but it wanted a user name and password?

Custom,intel,2.4GHz,1024mb,ATI X1500 256mb,

The coffee is lovely dark and deep,and I have code to write before I sleep,and I have code to write before I sleep.
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 1st Nov 2009 19:40
Strange it shouldn't, are you using SVN Checkout on http://svn.xp-dev.com/svn/SlyOdeWrapper/trunk/. Though I'm pretty sure you won't be able to commit to it without a username and password if you happened to try that.

Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 1st Nov 2009 19:53
A explanation of what I am working on is I rewrote the GILES.DLL that was posted on the forums.I load my .Giles file( Game Level ) directly into DBpro as one object with limbs, if I can apply the ODE Physics to an objects Limbs it would stream line the process.I am going to post the Giles.dll soon, just a little more debugging.
I create my level in Cartography shop4, export to giles ,lightmap with giles,load giles directly to DBpro.I discovered how to put prefabs in CS4 and get them lightmap correctly in CS4 or Giles.In rewritting the giles.dll I got very familar with the DBO format.I believe I can add it to the ODE.dll

Custom,intel,2.4GHz,1024mb,ATI X1500 256mb,

The coffee is lovely dark and deep,and I have code to write before I sleep,and I have code to write before I sleep.
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 1st Nov 2009 20:04
Quote: "A explanation of what I am working on is I rewrote the GILES.DLL that was posted on the forums.I load my .Giles file( Game Level ) directly into DBpro as one object with limbs, if I can apply the ODE Physics to an objects Limbs it would stream line the process.I am going to post the Giles.dll soon, just a little more debugging.
I create my level in Cartography shop4, export to giles ,lightmap with giles,load giles directly to DBpro.I discovered how to put prefabs in CS4 and get them lightmap correctly in CS4 or Giles.In rewritting the giles.dll I got very familar with the DBO format.I believe I can add it to the ODE.dll"


Interesting project, I don't have Giles but it would be nice to check it out when its done. Though I suppose this means you were able to download the source from the SVN?

Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 1st Nov 2009 20:16
didn't get SVN yet. Giles 1.3 is free now heres a screen shot of test room

Custom,intel,2.4GHz,1024mb,ATI X1500 256mb,

The coffee is lovely dark and deep,and I have code to write before I sleep,and I have code to write before I sleep.

Attachments

Login to view attachments
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 1st Nov 2009 20:26
If you still can't download it from there I attached the source to my post.

Attachments

Login to view attachments
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 1st Nov 2009 20:42
I got the svn to work I was not as familiar with SVN as I should be. I got tortise svn to work. Thanks

Custom,intel,2.4GHz,1024mb,ATI X1500 256mb,

The coffee is lovely dark and deep,and I have code to write before I sleep,and I have code to write before I sleep.
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 1st Nov 2009 20:48
As soon as I get some changes made that work Ill post back here

Custom,intel,2.4GHz,1024mb,ATI X1500 256mb,

The coffee is lovely dark and deep,and I have code to write before I sleep,and I have code to write before I sleep.
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 1st Nov 2009 21:40 Edited at: 1st Nov 2009 22:54
I built with your latest svn but when I try your breakable joints demo in DBpro I get a send dont send error.The breakable joints demo works with your Dll build?


edit: nevermind I see the difference.you added more functions in the other DLL

Custom,intel,2.4GHz,1024mb,ATI X1500 256mb,

The coffee is lovely dark and deep,and I have code to write before I sleep,and I have code to write before I sleep.
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 2nd Nov 2009 01:04 Edited at: 2nd Nov 2009 01:09
Sorry I guess I didn't keep it up-to-date, I'll update the SVN with my latest changes so it works correctly.

Edit: Okay I've updated it my changes should be in there now.

Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 2nd Nov 2009 15:34
I got your latest SVN,I had to rem out the ODE_EnableJoint,ODE_DisableJoint functions to be able to build.The build will run the breakable joints demo, but with a strange affect.here is a screen shot

Custom,intel,2.4GHz,1024mb,ATI X1500 256mb,

The coffee is lovely dark and deep,and I have code to write before I sleep,and I have code to write before I sleep.

Attachments

Login to view attachments
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 2nd Nov 2009 18:50
What version of ODE do you have, did you download it from their SVN or one of the released versions? I'm not sure how old the released version is but if you don't have enable/disable joint then its probably pretty old and I would download it from the SVN(fyi last I updated ODE was at rev. 1685 but I would just use the head revision).

Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 4th Nov 2009 15:42
I was using the 0.10.1 binaries because you had that in the read me.I updated to the 0.11.1 binaries and all works well.I am working on the code to add limbs, When I get an example with it working I'll post here.I will only beable to spend a few hours a day on it, but my son is going to write some of the code as well.He is our Head C++ programer

Custom,intel,2.4GHz,1024mb,ATI X1500 256mb,

The coffee is lovely dark and deep,and I have code to write before I sleep,and I have code to write before I sleep.
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 4th Nov 2009 22:49
Okay, good luck, and I'll remember to update the readme to use 0.11.1

Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 7th Nov 2009 18:25
Progress so far,I changed the DBO files to the current verision so will work with DBpro version 7.4 I posted a screen shot showing Static box Limb working (Iam using your raycast demo to test code)My next step is the Dynamic box limb, still got some bugs.

Custom,intel,2.4GHz,1024mb,ATI X1500 256mb,

The coffee is lovely dark and deep,and I have code to write before I sleep,and I have code to write before I sleep.

Attachments

Login to view attachments
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 7th Nov 2009 18:30
oops sorry Screenshot is now a Jpeg

Custom,intel,2.4GHz,1024mb,ATI X1500 256mb,

The coffee is lovely dark and deep,and I have code to write before I sleep,and I have code to write before I sleep.

Attachments

Login to view attachments
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 24th Dec 2009 20:09 Edited at: 24th Dec 2009 20:18
This update was mostly just organizing the code, it's now split into seperate classes and files along with additional configurations so I can hopefully get this to work with dgdk and maybe create a special dbc version(since dbc is always left out).

I still haven't got heightfields worked out yet so I'll probably save that for v0.6 and get plane and capsule geoms in first. ODE CREATE STATIC SPHERE was added and so was ODE CREATE STATIC TRIANGLEMESH with the optional geom param.

I did add in a few other miscellaneous commands:

ODE SET WORLD CONTACT SURFACE LAYER value
ODE SET AUTO DISABLE FLAG value
ODE SET AUTO DISABLE LINEAR THRESHOLD value
ODE SET AUTO DISABLE ANGULAR THRESHOLD value
ODE SET AUTO DISABLE STEPS value
ODE SET AUTO DISABLE TIME value

When you download you should also noticed it is renamed as dbpODE.dll so make sure you delete the older Release/Debug Ode dll from your user-plugins folder

Edit:

And I also finished up the breakable joints demo, not perfect but it gets the idea across.



Hockeykid
DBPro Tool Maker
16
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 24th Dec 2009 20:53 Edited at: 24th Dec 2009 20:53
Does this update happen to work with the FPSC source?

Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 24th Dec 2009 21:13 Edited at: 24th Dec 2009 21:14
Sorry I haven't done anything that would make it work with fpsc so I doubt it would work. It is on my todo list though.

Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 24th Dec 2009 21:30 Edited at: 24th Dec 2009 21:41
Lee uses ODE in FPSC source. I was thinking it should work but hadn't tried it. Hockeykid did you actually try to use it in some way?

Slayer93, does the DLL load automatically if you simply put it in the Plugins-user folder? If not and we have to actually load it in by code then it might not work because of that. I've tried that with another DLL and couldn't get it to work but everything that loads through the user folder has been working. e.g. Matrix util.

Addendum:

I noticed this line in the setup.ini file found in the compiler folder.

ExternaliseDLLS=No

Would this have something to do with DLL's outside of DBPro that I had tried loading manually with the the DLL load command?

-----------------------------------------------
OliveTreeGames
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 24th Dec 2009 23:23
Quote: "Lee uses ODE in FPSC source. I was thinking it should work but hadn't tried it. Hockeykid did you actually try to use it in some way?
"


From what I know the player falls through the floor when using my version. Its probably something pretty simple that I broke, but it will probably take some time to dissect the fpsc source to see what the problem is.

Quote: "
Slayer93, does the DLL load automatically if you simply put it in the Plugins-user folder? If not and we have to actually load it in by code then it might not work because of that. I've tried that with another DLL and couldn't get it to work but everything that loads through the user folder has been working. e.g. Matrix util."


Yes it works when you put it into the plugins-user folder. The way dbp works, as long as you use one command from one of the dlls it will include the dll in the exe.

Quote: "
I noticed this line in the setup.ini file found in the compiler folder.

ExternaliseDLLS=No

Would this have something to do with DLL's outside of DBPro that I had tried loading manually with the the DLL load command?
"


IIRC, externalizeDLLS just moves the dlls from inside the exe to outside, but if the dll was made for dbp then put it into the plugins-user folder to use. Otherwise use the dll commands.

Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 31st Dec 2009 04:00
Finished up v0.5.0, Static and Dynamic Capsule Geoms have been added. I also decided not to do plane geoms, I may do it in the future, but because if they were implemented they would be separate from objects I would have to add an extra way to handle them which would be a big hassle and I don't think they are really worth it.

But I didn't only want to implement capsules so I added in some more mass based commands. I changed Ode Set Body Mass to Ode Set Body Total Mass and changed how it works internally. Ode Set Body Center/Rotation has been added which changes the bodies center of gravity and its rotation.

Lastly I added Ode Set Body Mass Box/Cylinder/Sphere/Capsule/Triangle Mesh which is a command that fully setups the mass of an object and you just provide a density, fyi this is something used internally on dynamic objects using a density of 1.

binsky
15
Years of Service
User Offline
Joined: 6th Feb 2009
Location:
Posted: 26th Jan 2010 03:07
How can i compile this for DarkGDK. I downloaded your source code, and built the library with the dgdkrelease option, and got no errors. I then put the lib in my darkgdk lib folder and added it to the linker settings. Now what i am confused on is there is no include file(Header File) to include in my project. Where can i obtain this, or how can i make it?

Help is greatly appreciated!
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 26th Jan 2010 03:13
Sorry I didn't get that working yet, I put that in temporarily because that was one of the things on my todo list.

binsky
15
Years of Service
User Offline
Joined: 6th Feb 2009
Location:
Posted: 26th Jan 2010 03:17
Ahh ok. Well what do you need to complete iin order to get darkgdk working? Do you just need to creat that header file?
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 26th Jan 2010 03:31
Haven't worked with DarkGDK that much, but I think I just need to change the function pointers to get objects and such because I think they are different in dbp and dgdk. There may be some other stuff I'm not aware of because this will be the first time I'm working on making a lib in dgdk.

But I'll make it my next priority if there are some who want to use it.

binsky
15
Years of Service
User Offline
Joined: 6th Feb 2009
Location:
Posted: 26th Jan 2010 03:43
Ok. I tried using the odephysics.h and deleted everything except the void definitions, included that in my project and tried to run ode_start() command but I got a lnk2019 error. Not sure wats going on... oh well. Ill mess around with it later. Also I would just use real ode, but last time I tried I could get an object with physics working, but the collision was all messed up and its bounce would be very slow and the object would jst go up and down when it collided with something.
jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 26th Jan 2010 04:22
Have you tried The Game Creator's DarkPhysics? I implemented Tokomak physics in my JGC v3.x (Jegas Game Classes v3.x for DarkGDK).

It wasn't too bad to get it working. I'm thinking with the right header file you might have some success with ODE maybe?

binsky
15
Years of Service
User Offline
Joined: 6th Feb 2009
Location:
Posted: 26th Jan 2010 13:20
Yea ill look into tokomak. Also I was looking in the ode plugin source and the ode command start was defined as ode::ode_start(). Ill try messing around with the header, and if I get it working ill post it here for all you darkgdk users

Login to post a reply

Server time is: 2024-05-07 11:58:50
Your offset time is: 2024-05-07 11:58:50