motor2 development progress

March 21, 2008 on 11:28 pm | In Actionscript |

I just wanted to give you some updates on the recent motor2 development. I spent far too much time on alternative collision detection algorithms besides SAT and writing a fluid/soft-body solver which I will eventually integrate into the engine. So I’m way behind my schedule. Nevertheless I made some good progress over the last 2 weeks. The latest SVN revision now includes:

  • highly optimized box-circle and poly-circle collision detection
  • a framework for modeling forces, including some simple force generators (e.g. springs)
  • testbed package with dozens of ready-to-compile test scenarios
  • shape renderer example classes
  • fast buoyancy solver

Many bugs were fixed, among other things it turned out that there was a nasty bug in the contact solver which zeroed out all friction impulses. Now the simulation behaves much better, especially for stacks :).

Some words about drawing the scene onto screen: you should look at the ShaperRenderer class to understand how to draw the shape of a rigid body in order to implement custom rendering classes. My implementation draws the modeling space into a display object and then translates and rotates it according to the world space. An alternative is to directly draw the world space after every time step.

Furthermore I started to document the API. For performance reasons almost all fields are defined as public (some of them shouldn’t be modified because they are only used internally by the engine) so I decided to only write javadocs for those methods that make sense for the user.

If you want to be kept up to date about the latest changes you can subscribe to the new motor2 development mailing list at http://groups.google.com/group/motor2.

26 Comments »

RSS feed for comments on this post. TrackBack URI

  1. nice stuff! Keep up the good (flash) work!

    Comment by jankees — March, 21 2008 #

  2. Great stuff. Thanks for keeping us updated. When’s the ETA for joints? And are you thinking of adding any of the new features that Box2D just got in it’s 2.0 update?

    Comment by Robert — March, 22 2008 #

  3. +join, nice job! i love it ;)

    Comment by katopz — March, 22 2008 #

  4. Thx for this update Michael , will check it as soon as possible!

    Comment by JP — March, 22 2008 #

  5. Great news!

    Comment by Hristo — March, 22 2008 #

  6. Sounds good! I’m very curious about your soft body solver. I’d be very interesting to have this integrated into the engine.

    Comment by playpixel — March, 24 2008 #

  7. You’re a genius! Fantastic work.

    Comment by GW — March, 27 2008 #

  8. The buoyancy is nicely done. Archimedes would be proud.

    Comment by ryan — March, 27 2008 #

  9. great work!

    I’ve read somewhere you don’t use spatial coherence (yet?).

    This link may be useful:
    http://donar.umiacs.umd.edu/quadtree/index.html

    Also, I remember a technique based on bubble sorts along XY[Z] axis. This take advantage of temporal coherence. I don’t have the article reference right here, but don’t hesitate to email me if you’re interested.

    Comment by gludion — April, 3 2008 #

  10. motor2 uses a very efficient quad-tree implementation and will also have regular spatial hashing and SAP soon.

    Comment by Michael — April, 3 2008 #

  11. Inspiring work !

    I started working on a physics engine based on Box2D a few weeks ago and it’s now available (see physaxe demo on http://blog.haxe.org). This was a very good example for many haXe optimizations such as inlining and haxe.FastList

    Comment by Nicolas — April, 6 2008 #

  12. This looks great. How far along is the water effect? I’m very interested in making something that looks like water that you can interact with. Any ideas of where I could see something like that? So far it seems like what you are working on is the closest.

    thanks again,
    Bryce

    Comment by Bryce — April, 10 2008 #

  13. Hi Bryce, some time ago I made a demo which uses the buoyancy solver coupled with an animated water surface: http://www.polygonal.de/dev/motor2/buoyancy.html
    Another option would be a particle-based fluid simulator. I’m working on this but it’s in an early stage right now..

    Comment by Michael — April, 10 2008 #

  14. Don’t wanna be greedy, as what you’ve done so far is magnificent - but any ETA on when objects vs line segments will be done? I’m in real need of line segments!

    Cheers!

    Comment by GW — April, 11 2008 #

  15. I’ve started to play with the examples.
    It seems that motor2 is ready to be used in interesting works!
    I think I will try to start soon a game with it.
    I’ve seen a joints package in the SVN but not it seems ther is not yet an example with the use of joints ?

    Comment by JP — April, 12 2008 #

  16. Thanks Michael. Do you have the source for that buoyancy test with animated water surface? That looks pretty good. I’m anxious to the particle-based fluid simulator. Such fun stuff!
    –Bryce

    Comment by Bryce — April, 12 2008 #

  17. @JP added to the SVN.
    @Bryce I can’t share the buoyancy-code at the moment, it was done with an earlier version of motor so I would need to rewrite tons of things for it to work.

    Comment by Michael — April, 14 2008 #

  18. Hi, nice work!!!!
    I was just wandering, is there any way i could use your quad tree for collision detection in X/Z space in papervison? I would like to check for collisions on the ground plane between lets say some monsters and missiles that would hit them in my game?

    Thanks, Oskar

    Comment by Oskar — May, 13 2008 #

  19. What’s up man? Long silence

    Comment by henry — June, 14 2008 #

  20. We’re trying to decide on a physics engine to go ahead with in the future -
    - box2d is ugly and seems messy and hard to use
    - glaze is fast but missing features and attention, seems a little stagnant
    - physaxe looks great but we need as3
    - motor2 looks great but are you planning to promote it, work on it in the future- or is it on the backburner and going to remain as-is/die?

    Comment by tonypee — June, 15 2008 #

  21. motor is not dead, unfortunately i was kept busy with a long-winded and tedious project. but just yesterday I resumed my work on the engine. back to the fun stuff ;-)

    Comment by Michael — June, 18 2008 #

  22. BTW Physaxe is also available for AS3 (see the project page for explanations)

    Comment by Nicolas — June, 21 2008 #

  23. We would like to use Motor2 on an upcoming project. Can you give any indication when the two High priority will be resolved. Perhaps it would be wise to add a donation facility so we can help you along somewhat.

    Comment by TomByrne — July, 16 2008 #

  24. you mean all box2d points + circle/line collisiom ?

    Comment by Michael — July, 16 2008 #

  25. Yes, box2d joints and circle/line collision.

    Comment by TomByrne — July, 16 2008 #

  26. hi, just added circle/line collision (beta) to the svn. see testbed.collision.TestCircleLineCollision. I’ll try to port the remaining joints during the next week. Donations can be done here: http://lab.polygonal.de/motor_physics/ :-)

    Comment by Michael — July, 19 2008 #

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Proudly powered by WordPress Theme based upon Pool theme by Borja Fernandez.
Entries and comments feeds.