IrrODE - an Irrlicht - ODE wrapper (now with SVN)
Sorry, I didn't yet have time to check the ERP and CFM problem or get the latest VC2005 versions, but I'll upload a new version by the weekend including your work.
I use the pk3 file (which is just a zip file btw) in the "helloOdeWorld" demo. You can choose whether you want the sphere to drop on a box or on the Q3 level that comes with Irrlicht. Have you checked that demo? I don't use that feature in my projects, but I think it should be working nevertheless.
I use the pk3 file (which is just a zip file btw) in the "helloOdeWorld" demo. You can choose whether you want the sphere to drop on a box or on the Q3 level that comes with Irrlicht. Have you checked that demo? I don't use that feature in my projects, but I think it should be working nevertheless.
Dustbin::Games on the web: https://www.dustbin-online.de/
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Hi, I have been trying out the IrrOde wrapper and I would say it is very well done, however, there seems to be a memory leak issue even when I try the examples you supplied. If you check the memory usage in the task manager while the game is running, you should see that the memory usage keeps increasing until the game ends.
It does not really crash the application for now, but I am wondering if this is due to the simulation loop not doing a dJointGroupEmpty(contactgroup) as mentioned in ODE guide? Or if it is because of another reason that you might know of.
Thanks
It does not really crash the application for now, but I am wondering if this is due to the simulation loop not doing a dJointGroupEmpty(contactgroup) as mentioned in ODE guide? Or if it is because of another reason that you might know of.
Thanks
Shame on me. I noticed this problem a few days ago when I changed the event handling (now IrrOde events are created on the heap (with new) instead of the stack), but this is not the cause of the problem. I also added the dJointGroupEmpty call to the right place, but it doesn't seem to change anything. Seems like I'll have to search my code a little more (btw: does anyone know a tool that could help me under Windows?). Maybe I should also try some *real* old version and see if it is there already.
Dustbin::Games on the web: https://www.dustbin-online.de/
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Hi, I still didn't give up the idea of compiling the IrrODE Wrapper on MacOSX.
Maybe you have a very early piece of code of your wrapper, that I could use to debug? Would be easier to understand the problem for me.
Just for info:
The errors I receive when running the HelloWorld app (using the cube) are raised from the ODE functions which I installed via MacPorts (=release version), so I can't debug further until I build debug version from source.
I debugged and found the error:
ODE INTERNAL ERROR 2: Bad argument(s) in dxBox()
is raised on following statement in CIrrOdeDevice::geomCreateBox:
wrap->m_pGeom=dCreateBox(GETSPACE(iSpace),fWidth,fHeight,fDepth);
Maybe you have a very early piece of code of your wrapper, that I could use to debug? Would be easier to understand the problem for me.
Just for info:
The errors I receive when running the HelloWorld app (using the cube) are raised from the ODE functions which I installed via MacPorts (=release version), so I can't debug further until I build debug version from source.
I debugged and found the error:
ODE INTERNAL ERROR 2: Bad argument(s) in dxBox()
is raised on following statement in CIrrOdeDevice::geomCreateBox:
wrap->m_pGeom=dCreateBox(GETSPACE(iSpace),fWidth,fHeight,fDepth);
@Zurzaza: I checked for the setERP and setCFM implementations in CIrrOdeWorld and they were really missing. Where have the times gone when the compiled gave an error on declared but not implemented methods? I didn't yet upload a new version, but I'll do that this evening or tomorrow.
Still got no idea where the memleak comes from. I think I'll test some of the ODE demos for leaks as well, and maybe I'll try test the OPCODE and GIMPACT trimesh detection, maybe that's the source. The "Stunt Marble Racers" game does also leak, but far slower than the IrrOdeCar demo. One big difference is that the Marbles game does just have one Trimesh per level (the level itself) whereas IrrOdeCar has about 50 of them (the road segments, the car bodies, the plane and the helicopter).
@bluecat: That's nice. If you wish you could provide the MacOS project and a little text file (as tutorial) and I'll include it in the distribution and the sourceforge project.
Still got no idea where the memleak comes from. I think I'll test some of the ODE demos for leaks as well, and maybe I'll try test the OPCODE and GIMPACT trimesh detection, maybe that's the source. The "Stunt Marble Racers" game does also leak, but far slower than the IrrOdeCar demo. One big difference is that the Marbles game does just have one Trimesh per level (the level itself) whereas IrrOdeCar has about 50 of them (the road segments, the car bodies, the plane and the helicopter).
@bluecat: That's nice. If you wish you could provide the MacOS project and a little text file (as tutorial) and I'll include it in the distribution and the sourceforge project.
Dustbin::Games on the web: https://www.dustbin-online.de/
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
I sent you the project link as private message.
There are some issues however. Maybe you can help to resolve them?
1.) In the IrrOdePlayground, using Trimesh-Terrain, there were no collisions. Using the other option (Heightfield?) works.
2.) In the irrOdeCar Demo, I had to disable the Plane (in the /data/irrOdeCar.xml file) and in the irrodecar_main.cpp.
On loading, there was an error (Assertion failed) in the ODE function
dNormalize, but I couldn't define, which was the offending vector.
Also, the collision didn't always work, just one of the ramps in the simple car example would collide.
There are some issues however. Maybe you can help to resolve them?
1.) In the IrrOdePlayground, using Trimesh-Terrain, there were no collisions. Using the other option (Heightfield?) works.
2.) In the irrOdeCar Demo, I had to disable the Plane (in the /data/irrOdeCar.xml file) and in the irrodecar_main.cpp.
On loading, there was an error (Assertion failed) in the ODE function
dNormalize, but I couldn't define, which was the offending vector.
Also, the collision didn't always work, just one of the ramps in the simple car example would collide.
First of all: a new version is online (SVN updated, link for download see first post):
* moved the Code::Blocks project to Code::Blocks 10.05
* remove some old methods
* some "const" adaptions for the latest gcc
* added implementation of the set and get methods for the world's ERP and CFM to CIrrOdeWorld
* fixed a bug in CIrrOdeAeroDrag for reverse moving objects (it's not a real fix but a workaround)
@bluecat: ODE has three different trimesh collision methods (OPCODE, GIMPACT, new OPCODE). OPCODE is on by default, but maybe you disabled it. One of the ramps in the IrrOdeCar demo is a trimesh, the other one is a box (the one closer to the simple car is the trimesh). Did you try to drive on the terrain? The terrain in this demo is also a trimesh. Hmm ... I think I'll have to check the console with the car demo to see if there's something displayed about the plane there (though it works fine under Windows).
* moved the Code::Blocks project to Code::Blocks 10.05
* remove some old methods
* some "const" adaptions for the latest gcc
* added implementation of the set and get methods for the world's ERP and CFM to CIrrOdeWorld
* fixed a bug in CIrrOdeAeroDrag for reverse moving objects (it's not a real fix but a workaround)
@bluecat: ODE has three different trimesh collision methods (OPCODE, GIMPACT, new OPCODE). OPCODE is on by default, but maybe you disabled it. One of the ramps in the IrrOdeCar demo is a trimesh, the other one is a box (the one closer to the simple car is the trimesh). Did you try to drive on the terrain? The terrain in this demo is also a trimesh. Hmm ... I think I'll have to check the console with the car demo to see if there's something displayed about the plane there (though it works fine under Windows).
Dustbin::Games on the web: https://www.dustbin-online.de/
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
@bluecat: I integrated you XCode project, added it to the repository and am currently uploading a new version. I hope it's OK (don't know that much of MacOSX), there were some files with the same name as directories, and this is not possible in Windows, so I had to remove those files. I hope it still works this way.
Dustbin::Games on the web: https://www.dustbin-online.de/
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
@Brainsaw: Thanks for the update and integrating my project. I will try to import the latest svn repo, if it still works on OSX. Macs love to throw around with duplicate files, which drives System Admins crazy in corporate networks
The collision problem is indeed related to Trimeshs. The treemesh spaceship also doesn't collide in the Playground demo. And the cars won't collide with the terrain either. I will check the collision options you mentioned and give feedback on that.
The problem with the plane object in the car demo is an ASSERTION that fails. This will ONLY get raised in the ODE library debug version. Assertions are not checked in the release version.
The collision problem is indeed related to Trimeshs. The treemesh spaceship also doesn't collide in the Playground demo. And the cars won't collide with the terrain either. I will check the collision options you mentioned and give feedback on that.
The problem with the plane object in the car demo is an ASSERTION that fails. This will ONLY get raised in the ODE library debug version. Assertions are not checked in the release version.
OK. Does the collision between the car and the road work? The road is a trimesh as well. There are some problems with trimesh collision detection on Windows as well, but only in the release version, the debug works fine. That's why I link the debug version statically, and when compiling I define "dNODEBUG" so that no assertions come up (maybe I should try a *real* debug version to see if the assertion happens here as well).
Hmm .. maybe the problem is here as well ... in the Windows version you don't see the wheels of the plane as long as it's not moving. But, as I said, I disabled assertions, and as long as the demo runs I got no problem with that.
Hmm .. maybe the problem is here as well ... in the Windows version you don't see the wheels of the plane as long as it's not moving. But, as I said, I disabled assertions, and as long as the demo runs I got no problem with that.
Dustbin::Games on the web: https://www.dustbin-online.de/
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
The road is the striped ramp going upward, right? This also doesn't collide. Not the gas station nor the terrain. The only colliding thing is the ramp that is facing away from you on start. This must be the box object you mentioned.
But I can drive up and jump this ramp just fine, works as expected.
I will also try to compile ODE without debug assertions. I just thought I mention it, because you are obviously a rather pedantic programmer (like me). Not a single warning in your code, compared to several hundred in Irrlicht for example...
But I can drive up and jump this ramp just fine, works as expected.
I will also try to compile ODE without debug assertions. I just thought I mention it, because you are obviously a rather pedantic programmer (like me). Not a single warning in your code, compared to several hundred in Irrlicht for example...
Hi Brainsaw,
I checked out the latest SVN version.
1.) The XCode folder you included works well, thank you.
2.) As you suspected, OPCODE was disabled in my ODE build. I enabled it and now the trimesh collisions work perfectly in the HelloWorld and Playground apps. I just yet failed to build the IrrOdeCar Demo, but it's just a matter of time...
I checked out the latest SVN version.
1.) The XCode folder you included works well, thank you.
2.) As you suspected, OPCODE was disabled in my ODE build. I enabled it and now the trimesh collisions work perfectly in the HelloWorld and Playground apps. I just yet failed to build the IrrOdeCar Demo, but it's just a matter of time...