Home > alchemy, flex > ODE (Open Dynamic Engine) for Flash

ODE (Open Dynamic Engine) for Flash

February 23rd, 2009

I’ve took Alchemy for a test and decided to compile ODE (Open Dynamic Engine). Just to add yet another physics engine to the Flash World. It was a hell of a ride but I finally got to produce some bouncing balls :) . For a still unknown reason some as 3d libraries have been very slow to render 6 translucent walls and 2 balls. Papervision3D seems to move quite decent.

You can download the ode sources from here. To recompile them do (you need to have the Alchemy  environment turned on):


make clean



cd ../ode/src


cd ../swc


And here are the bouncing balls:


The Source view for the bouncing balls seems to be broken. So if you want to see the source for my little test project here it is.

Categories: alchemy, flex Tags:
  1. March 5th, 2009 at 10:20 | #1

    awesome job, a little bit of camera movement would have helped more to understand what was happening at first, but i guess it would have slowed down the FPS

  2. Djem
    March 21st, 2009 at 15:07 | #2


    This engine is also used in world of goo.

    I think this is the best engine.

  3. June 5th, 2009 at 12:51 | #3

    Impressive stuff! I will give it a spin in the near future. Nice work!

  4. October 14th, 2009 at 11:20 | #4

    Very impressive.

    I tried to recompile the library (I added the triMesh geometry and wanted to test it), but encountered problems with ./configure step

    The configure process hangs on this step (I\\\’m using Alchemy on MacOs Leopard)
    checking whether the C compiler works… /Users/piotr/flex_sdk_340/bin/adl _sb_{SOME_NUMBER}/app.xml 2> /tmp/adl.trace & echo $

    I\\\’m sure my Alchemy environment is configured correctly – I followed the instructions
    and managed to compile the \\"stringecho\\" example successfully.

    Any ideas why the compilation of \\"ode-flash\\" fails?

  5. Arthy
    April 20th, 2010 at 19:23 | #5


    I tried to get your sources and compile the swc again (to include more of ODE method such as getGeomRotation).

    But i have a problem when compiling the swc part… some files are missing or include links are broken.

    Can you repost the source files that would work again please ?
    Thank you.

    By the way i had to install the files in /opt/alchemy/samples/ode-flash to get the compilation works.

  6. Arthy
    April 20th, 2010 at 19:29 | #6


    I first got the error :
    ode.cpp:1:17: error: AS3.h: No such file or directory

    So i copied the AS3.h in the swc folder, but then i get errors like this :
    ode.cpp: In function ‘_AS3_Val* thunk_dGeomGetPosition(void*, _AS3_Val*)’:
    ode.cpp:260: error: cast from ‘const void*’ to ‘unsigned int’ loses precision

    Thanks for your help.

  7. Arthy
    April 21st, 2010 at 10:51 | #7

    sorry my flex config was broken, now everything is going fine except that many many errors are thrown during /ode/src compilation…

    mainly from array.h, objects.h and .cpp files…

    here is an extract of errors :
    array.h:65: error: ‘operator new’ takes type ‘size_t’ (‘long unsigned int’) as first parameter
    objects.h:52: error: ‘operator new’ takes type ‘size_t’ (‘long unsigned int’) as first parameter
    objects.h:53: error: ‘operator new’ takes type ‘size_t’ (‘long unsigned int’) as first parameter
    objects.h:55: error: ‘operator new’ takes type ‘size_t’ (‘long unsigned int’) as first parameter
    objects.h: In destructor ‘virtual dObject::~dObject()’:
    objects.h:69: error: no suitable ‘operator delete’ for ‘dObject’
    ode.cpp: In function ‘dxBody* dBodyCreate(dxWorld*)’:
    ode.cpp:249: error: no suitable ‘operator delete’ for ‘dxBody’

    any idea ?

Comments are closed.