Box2D

This topic contains 16 replies, has 6 voices, and was last updated by  abakobo 2 months, 3 weeks ago.

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #3907

    abakobo
    Participant

    I continued the work of nitrologic on Box2D for Monkey2

    Now with a basic GFX/mojo debugDraw demo

    https://github.com/abakobo/Box2D_for_monkey2
    https://github.com/abakobo/Box2D

    will now try to get all the API working… hope the more difficult has been done.

    If anybody wants to participate, welcome!

    edit: now with stress test based on R.U.B.E. c++ source import

    #3950

    Simon Armstrong
    Participant

    Sweet abakobo! I was hoping someone was going to pick this up:)

    Will be back this weekend…

    #3954

    gcmartijn
    Participant

    You know that https://chipmunk-physics.net is faster, see the benchmark.

    I don’t know how easy it is to convert to mx2 but its a alternative

    #4004

    abakobo
    Participant

    @Simon Armstrong:

    What tools did you use to machine pass/translate the API? I have no idea how it can be done. I’ve had a look at docxygen and clang but it’s very blury to me…

    #4005

    gcmartijn
    Participant

    Maybe I’m going to work on my C2MX2 ‘converter’ again in the future.
    Maybe you are searching this. (its a year old, and not up to date with the current MX2)

    https://github.com/gcmartijn/C2MX2

    #4243

    abakobo
    Participant

    Now with all bodies and joints types working and a aabbQueryCallback for mouse joints all in monkey2 language only.

    The bodies_and_joints.monkey2 is the one with most features available now.
    https://github.com/abakobo/Box2D_for_monkey2
    https://github.com/abakobo/Box2D

    It’s getting to be almost usable!

    I have some memory question… It starts at 24M of Ram and it grows to 36M but then stops. Is it a normal behaviour or is there a problem with my memory management (lots of externals here…)? If someone can have a look at the code it would be great. (the code should be better documented but I think it’s readable..)

    #4253

    Mark Sibly
    Keymaster

    Awesome work!

    It starts at 24M of Ram and it grows to 36M but then stops.

    Yes, this is the GC at work.

    If you want, you can put a GCCollect() at the bottom of OnRender() or somewhere called frequently. This will slow things down a bit, but it gives you a much better idea of how much memory is really required by the app, and whether there are any leaks.

    #4278

    Simon Armstrong
    Participant

    @abakobo

    Sorry I missed your post.

    This is the code I knocked together for the machine translation pass:

    https://github.com/nitrologic/m2/blob/master/autoimport/listimports.monkey2

    #8864

    abakobo
    Participant

    I’ve moved the WIP box2d module to a fork of the original box2d because there has been some commits recently so I wanted to be able to udate easily in the future.
    I’ll work again on it so If anyone is intersted in teamwork please tell.
    https://github.com/abakobo/Box2D

    #8865

    Diffrenzy
    Keymaster

    Cool, great to see that this is still alive 😀

    #12498

    abakobo
    Participant

    I’ve been working on the module a bit.

    Now wrapped (partially) the b2djson lib from iforce2d (The R.U.B.E. importer). Still have to implement images import.
    Unfortunately it uses another json lib than mx2’s but it’s not that large. And I did not want to dig into cpp to use the mx2 json module.
    The loader is compatible with the mx2 asset construct thus compatible with Android (tested).

    On the pure box2d side, I have to work on Callbacks, collisions and wrapping b2d’s generic functions to have the api fully wrapped. Buoyancy is on the list too.

    Should be continuing in January, Christmas events are taking more time that expected, as usual..

    #14048

    abakobo
    Participant

    a small show of the state of the module is attached

    It’s now usable for those who have R.U.B.E.

    There is of course a lot of things that can be done still, but I’ll start to work on my game and add features to the box2d module when I need them. Will release as module later then.

    You can download the ready to build demo example at: http://turdus.be/monkey2docs/hopa-source.zip

    Attachments:
    #14052

    Ethernaut
    Participant

    Super cool! Ran perfectly, and I managed to get to the end of the right side, when I finally flipped the rover upside down against the wall. 🙂

    #14058

    abakobo
    Participant

    And an emscriptem page for the little demo (almost forgot mx2 was super cross platform!)

    http://turdus.be/monkey2docs/hopa/

    #14059

    Ethernaut
    Participant

    We should start gathering those Emscripten demos into a web gallery! It runs incredibly well in a browser…

Viewing 15 posts - 1 through 15 (of 17 total)

You must be logged in to reply to this topic.