QuickBox2D Editor

When I first created QuickBox2D I simultaneously developed a simple editor to aid in the creation of complex simulations. The result is very alpha and should be used cautiously. There is no UI, it is entirely key controlled. It generates actionscript files that can be copy and pasted into working simulations. It also has a preview mode for previewing simulations as you develop them. This is by no means a full featured editor, there is a good deal of work to be done on it. I am releasing the code as a simple zip for people who would like to develop it further. If there is enough interest I’ll create some kind of code repositiory, but for now I’m just releasing the below zip.

Take a look at the editor

Download the Source

I may post further instructions for the editor in the future… Remember to save your work frequently and to create new versions for every change that you make to a file.

Suggested Features:
Simple GUI
Base64 encoding for get string

Known Issues:
Making joints that don’t touch things can break the preview app.

This entry was posted in QuickBox2D and tagged , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

27 Comments

  1. robodude666
    Posted April 16, 2010 at 11:49 am | Permalink

    Lookin’ good!

    Might I recommend using Base64 encoding for the preview data in the argument string. It will primarily just look better than seeing actionscript code in the URL of the preview.

  2. Posted April 16, 2010 at 1:13 pm | Permalink

    that’s not a bad idea… I’ll have to start making a list of suggestions…

  3. Posted April 16, 2010 at 2:08 pm | Permalink

    Hi mate!

    You would say you could put this project on github so we all can contribute with more than simple suggestions. I think everybody are exiting about this initiative. cheers

  4. Posted April 17, 2010 at 7:34 am | Permalink

    Very nice stuff once agin ;)

    Other problem I saw:
    - After adding a joint and after the preview crash. Erase the joint don’t remove it from the as file (and the preview still crash)

    Have a nice sunny afternoon ;)

  5. Yurgen
    Posted April 17, 2010 at 1:50 pm | Permalink

    nice!
    how about a resizing of objects?
    I’ve tryed to make own level qb2d editor, but did not find any methods for it yet

  6. Mauricio
    Posted April 18, 2010 at 1:06 am | Permalink

    Looking good! its a good start, it only needs an option to convert one object to static/dynamic (density=0 in the preview)

  7. Posted April 19, 2010 at 2:34 pm | Permalink

    Thanks man! I have been waiting for this.

  8. lolo
    Posted April 19, 2010 at 4:34 pm | Permalink

    houaaa :)

    i just spent 4 days on creating my game level … with this tool i do the same job in 4 hours :-D

    thanks !

  9. Mauricio
    Posted April 21, 2010 at 8:14 pm | Permalink

    i have 1 question (about quickbox2D not the editor)… can you change the density and linearDamping on-the-fly (during runtime)?

  10. Posted April 21, 2010 at 9:16 pm | Permalink

    You cannot change density at runtime… and I’ve never tried to change linearDamping during runtime (pretty sure it’s also not possible).

  11. ColKernel
    Posted April 22, 2010 at 5:25 am | Permalink

    Hey everyone!
    I tried changing linear damping on an Event.ENTER_FRAME callback and it seems to work using:
    b2Body(quickObject.body).m_linearDamping = myLinearDamping;

    Likewise for density :
    b2Shape(quickObject.shape).m_density = myDensity;
    … but for that to work you also need to reset the object mass with : b2Body(quickObject.body).SetMassFromShapes();

    (((quickObject being your QuickObject instance)))
    (((also, be sure to import the b2Shape and b2Body classes)))

  12. Posted April 22, 2010 at 5:31 am | Permalink

    very cool

  13. Posted April 22, 2010 at 10:37 am | Permalink

    Wow Zevan, this is great!
    You should add some features like, density, friction, restituition, and a way to make joints attachable to the world…

    also why dont you answer to my mails anymore? lol :D

  14. Mauricio
    Posted April 22, 2010 at 11:59 pm | Permalink

    VERY VERY useful, thanks!! :)

  15. Mauricio
    Posted April 24, 2010 at 11:04 pm | Permalink

    another question…. i know you should not change the location of the object manually (you should use forces, velocity, etc) but i’m creating a quickObject that works as a portal, so when the player (other quickobject) collides with the portal, it should change the location… i’m using the function setLoc like this:
    player.setLoc(newX,newY);
    but it does not seem to work
    it seems like the location is changed one moment, but the engine “updates” the coordenate to the last position… Any suggestion?

  16. Mauricio
    Posted April 24, 2010 at 11:23 pm | Permalink

    oops… it does not work inside the collision functions
    (onAdd, onPersist, onRemove)
    but it does outside…

    sorry :)

  17. MC
    Posted May 2, 2010 at 10:14 am | Permalink

    How can i handle sensors and cinematic objects from Quickbox2D? (sensors: objects that not collides but you can test if they overlap with other objects. Cinematic: objects that not respond to forces like gravity, etc, but they respond to velocity and acceleration changes)

  18. Mike
    Posted May 8, 2010 at 8:08 pm | Permalink

    I’m really enjoying QuickBox2D. Keep up the great work!
    One thing I’m having trouble with is creating joints dynamically. I’d like to create some ‘nodes’ dynamically with a simple XML file. I can create the objects just fine but I can’t figure out how to link the joints together. I tried naming each instance box.userData.name =”boxName1″
    … and then using:
    var joint:QuickObject=sim.addJoint({a:getChildByName(”boxName1″).body … but it isn’t working. Is there a way to do this??
    Mike

  19. mikele
    Posted May 26, 2010 at 9:26 am | Permalink

    I just played around with your quickbox2d editor. really like it!
    I made some modifications with flex like loading picture, changing frequency of Joint, changing friction and density..
    And joints-bug is also fixed as well as the polyObject…
    Only if you’re interested, you can send me your email-address and I’ll send you the SWFs and the source (after i documented it a little bit).
    cheers!

  20. MC
    Posted August 2, 2010 at 12:27 am | Permalink

    We’re all interested Mike! :)

  21. Mariusz
    Posted August 5, 2010 at 12:54 pm | Permalink

    A W E S O M E !!! THX

  22. Posted August 23, 2010 at 12:40 am | Permalink

    I love you man :)

  23. sigman
    Posted December 16, 2010 at 2:35 am | Permalink

    The editor is great! Thanks for sharing this with us :)

    I’ve got a question, don’t know where to ask. Couldn’t find anything about that yet. Is it possible to rotate a body like a box or poly around different point than the body center? They only solution that comes to my mind is to create another small body and use RevoluteJoint but I wonder if there is any cleaner method?

  24. Posted December 20, 2010 at 3:37 am | Permalink

    I made my portfolio using the awesomest QuickBox2D engine. Check it here : http://www.16argarden.com/

    Enjoy !

  25. Ganaraj
    Posted April 3, 2011 at 8:45 pm | Permalink

    Hi,

    I have been using your library quite extensively for my Masters project. I noticed that there is probably a bug in the implementation of quickcontacts. Basically I am trying to write a GP with 4-5 Ragdolls trying to stand up. For this purpose I created a Ragdoll class which takes care of drawing all the bits and pieces of a ragdoll including its shapes and joints. Now what I noticed was that if i did a simulator.addContactListener() and got a copy of the quickcontacts object inside each of the different ragdolls , then only the ragdoll that was added the last was getting the contact events. I dont know if this is the intended behaviour ..is it?

    In the simplest of cases you could probably make Quickcontacts a singleton and keep returning the same object over and over again?

  26. Posted April 13, 2011 at 11:03 pm | Permalink

    i just managed to create an alternative version… created the custom class receiving the “sim” in the constructor and from there I create the new QuickObject normally using other received parameters

  27. ali
    Posted June 17, 2012 at 3:31 am | Permalink

    hi, i have a quickObject group with the objects [ob1,ob2,ob3].
    is there a way to change the angle of object ob1 during runtime ?!!

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*