[ODE] Update on 2d ODE library

John DeWeese deweese at ict.usc.edu
Sun May 4 18:10:02 2003


Hey, great... looking forward to it! I have also found ** to be a great
help. Really, what a guy. Anyway, it's OK to keep it internal, but do
you think an interviewer would be more impressed with a 2D library based
on ODE that you wrote, or you being a bit of a main dude in an OS
project with many contributors? Also many of us, me included, would be
happy to work on that library in order to make it a better product.

Strikes me as a bad thing to do, to limit things to one physics world
per app... expecially when it's in there already! Keeping it in would
shield you from Joe Amazing Appwriter who does need that functionality.
Here's one... build a Kai's Power Tools-like app, where you build an
environment with minor variations, and then all of them play
simultaneously, and you choose the one that looks best (then make
variation of that, etc.)  Or, something analogous to multiple viewports
in opengl, each with their own world that does different things.

Collisions... what techniques are you using? Perhaps you could post a
code snippet? As a first pass, I'm guessing you're not worrying about
axis-aligned range/quadtree sorting, nor any extrusion through time.
That may be why you're seeing two boxes go through each other. Anyway,
you're left with a static frame, independant of motion. So now it's just
a bunch of polygons in relative coordinate spaces, so after a bounds
test, naively I would guess you could translate object A into the
reference frame of object B, then do a polygon-halfspace clipping
routine and see if you get anything back. Using a convex hull here might
be the best way to do it, since it's cheap. If you just have boxes or
convex hulls, that's it. Otherwise, check further.

   - John

caj@cs.york.ac.uk wrote:
> Hi all!
> 
> I haven't posted for a while (and I think last time I tried to post this
> message it died for some reason).
> 
> I'm now writing a 2d ode library, mainly based on the information on **'s
> web page (thanks alot!)
> 
> I will eventually open-source it, but for the near future I'd like to
> write all of it myself, because at some point I'm going to try for a
> (probably game-related) job, and I imagine being able to say "I wrote all
> this" will be a bonus to getting it :)
> 
> However, if someone could answer a couple of questions.. it would be helpful.
> 
> 1) Has anyone actually ever written a program that uses more than one
> "world"? Seems annoying having them in the API all the time if no-one uses
> them..
> 
> 2) The main problem I'm having is with the collisions.. particularily in
> cases like having two squares which are rotating but moving slowly apart.
> Any references on "advanced collision detection" much appresiated!
> (espically because I'd like to move toward colliding arbitary objects made
> of triangles..)
> 
> Thanks for any replies!
> 
> Chris
> 
> 
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode