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.
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.
27 Comments
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.
that’s not a bad idea… I’ll have to start making a list of suggestions…
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
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
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
Looking good! its a good start, it only needs an option to convert one object to static/dynamic (density=0 in the preview)
Thanks man! I have been waiting for this.
houaaa
i just spent 4 days on creating my game level … with this tool i do the same job in 4 hours
thanks !
i have 1 question (about quickbox2D not the editor)… can you change the density and linearDamping on-the-fly (during runtime)?
You cannot change density at runtime… and I’ve never tried to change linearDamping during runtime (pretty sure it’s also not possible).
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)))
very cool
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
VERY VERY useful, thanks!!
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?
oops… it does not work inside the collision functions
(onAdd, onPersist, onRemove)
but it does outside…
sorry
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)
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
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!
We’re all interested Mike!
A W E S O M E !!! THX
I love you man
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?
I made my portfolio using the awesomest QuickBox2D engine. Check it here : http://www.16argarden.com/
Enjoy !
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?
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
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 ?!!