miniODE - a free ODE wrapper

Blitz3D Forums/Blitz3D Userlibs/miniODE - a free ODE wrapper

Yasha(Posted 2010) [#1]
For reasons that may yet be revealed, one of my current projects requires a free-and-open-source physics engine. Tokamak still has memory leaks, so I had to find another option...

miniODE is a super-lightweight physics engine for Blitz3D, intended for adding a little extra dynamism to things like first-person shooters or other non-physics-based games, by providing the ability to stack and throw crates, add ragdoll corpses, and similarly low-demand fun effects. It intentionally only exposes the bare minimum of ODE's functionality, in order to stay as unobtrusive as possible - it's not intended for high-precision or complex simulations such as racing games or industrial simulation.


What's included
===============

- Rigid bodies
- Primitive collision geometry (sphere, box, cylinder, capsule)
- Static trimeshes
- Simple joints (hinge, ball-and-socket, slider)
- Dynamic "materials" for different contact and friction effects
- Easily alterable world and object parameters
- Source code (B3D and C++)


What's not included
===================

- Anything not on the list above!
- Dynamic trimeshes (might add these later)
- Motors
- Sensors
- Complex friction
- Collision detection information (might change this)

If you need any of these things, miniODE is not the solution for you! Consider using BlitzODE, JV-ODE or (for collision detection only) ColDet instead.


ODE itself is made available under either LGPL or BSD licences, so you must remember to credit Russel L Smith in your project. The miniODE wrapper is hereby to be considered public domain (although credit would be nice!) and is available here:

Page: https://sites.google.com/site/nangdongseng/downloads
Direct link: https://sites.google.com/site/nangdongseng/downloads/miniODE.zip?attredirects=0&d=1

(This is a Google Sites page - I don't know how reliable that is... someone else might need to host this in the long term.)

I haven't written any proper examples yet, but I will try to construct some soon There are some heavily-annotated examples in the download that may hopefully be of some use. I also haven't tested it at all thoroughly, so please report any odd behaviour or outright mistakes here and we'll see what can be done. miniODE uses the latest available ODE (0.11.1) so the main physics part should be solid enough, but my code might not (I don't even know C++! Only C99). As much as possible is written in Blitz3D, so hopefully it ought to be easy to edit if necessary.

Happy ragdolling!

Last edited 2010


VIP3R(Posted 2010) [#2]
Looks decent, good luck with it :)

The 'miniODE.bb' include file is missing in the download, so I was unable to run it. I'll have another look when you've added it.


Yasha(Posted 2010) [#3]
Yikes, that was catastrophically stupid of me... thanks for pointing it out. I've added miniODE.bb (and the important C++ file plus build instructions for those interested in doing it themselves).


VIP3R(Posted 2010) [#4]
We all make mistakes ;)

It's a good little wrapper, ideal for the folks you've aimed it at. As you've pointed out it needs a few demos as it uses a unique API, but once those are added it should be pretty easy to pick up.


Jiffy(Posted 2010) [#5]
Very nice!

A free wrapper for a free library! Who would have thought?

For your work & integrity (& most especially sharing the source) I thank you!


Yasha(Posted 2010) [#6]
Thanks guys!

I've added four examples to the download: simple setup, world and object parameters, dynamic materials, and joints. Hopefully that ought to be enough for people to get the general idea, although I'm open to suggestions if anyone has any more ideas (I need to try my hand at creating a ragdoll sometime, I suppose...).


Jiffy(Posted 2010) [#7]
I don't know about others (plus- I'm not there yet)- but I always need geometry info- tri, uv or whatever.


Charrua(Posted 2010) [#8]
Hi, i see it yesterday night, this morning i run the demos and read some of the code.
Great contribution, nice work!
Has thinked to Post it on "Blitz Research Community News" and/or the TollBox?

Thank's

Juan


jfk EO-11110(Posted 2010) [#9]
Thanks a lot! Very useful.


Charrua(Posted 2010) [#10]
Hi, Yasha, yesterday i gave ode support from awc, a small & free world creator i'm working on. Today i do the same for your miniOde. It's in an experimental phase, so your feedback wil be welcome.

Basically, the info exproted from the editor is very small: If an object is only a blitz mesh, if it's static or dynamic. From the object we obtain position, rotation scale and type: Box, sphere and cylinder at this moment.

Attached are a file "awc_miniODE_lib.bb" with functions for scan the list of objects and to create the phisics ones.

Similar with joints.

I posted 4 demos for Ode and for miniOde from the same worlds. From the point of view of the editor, doesn't mather if will use ode or miniode. The difference is on the "awc_miniODE_lib.bb" and the "awc_ODE_lib.bb" that will be used. And of course, the functions you use to handle the bodies, joints and the like. But the loader only loads the world, creates the bodies and joinst. The rest is up to you.

for download awc:
http://sites.google.com/site/odriozolajuanignacio/awc1.zip
thread:
http://blitzbasic.com/Community/posts.php?topic=88756

Juan


Charrua(Posted 2010) [#11]
hi!

i wrote 5 demos of using miniOde with a free world editor.
The idea is to place objects (nothing new) and then load the world (nothing new) but, with a lib i wrote, ode objects (body, geom, joint) are created based on the shape defined on the editor, position, scale, etc.

take a look

http://sites.google.com/site/odriozolajuanignacio/juanodriozola/blitz3d

comments are welcome

Juan