By Zevan | April 16, 2010
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.
I’ll be releasing the QuickBox2D on googlecode in the near future based on the response to yesterdays post.
By Zevan | March 31, 2010
So I have a QuickBox2D editor that I’ve had since the earliest version of QuickBox2D. It is really pretty buggy and imperfect. I’m wondering if I should release it even though it’s really buggy… my main issue is I won’t be able to guarantee that it is a safe editor to use for real projects.
Thoughts? Should I release it anyway?
Posted in QuickBox2D | Also tagged Box2D |
Lots of people have mentioned that they have problems with QuickBox2D Polygons. The simple solution is not to use the verts 2d array (which is more like how Box2D does polys). So when in doubt about polygons, simply use the points array which will nearly always work as long as the contour you define does not cross over itself. Here is a simple example on wonderfl:
Also... polygons are covered extensively in part two of the tutorial over at active tuts... more on that later.
Here is the timeline code:
Actionscript:
-
import com.actionsnippet.qbox.*;
-
/*
-
0
-
/ \
-
0_0 0
-
| |
-
0-0
-
*/
-
var sim:QuickBox2D = new QuickBox2D(this);
-
sim.createStageWalls();
-
// define the contour of your poly
-
// no limits as long as it doesn't cross over
-
// itself
-
sim.addPoly({x:10, y:5, points:[0.5,0,
-
1, 1,
-
1, 2,
-
0.5, 2,
-
0.5, 1,
-
0,1,
-
0.5,0],
-
wireframe:false});
-
sim.addCircle({x:11, y:10});
-
sim.start();
-
sim.mouseDrag();