Where to find demos (platformer+creating objs)-with source?

Aside from the demos that come with box2d, does anyone have links to any additional demos with source?

I just need an example of a simple platformer, dealing with slopes, and also a demo using the mouse to drag points to form solid objects.


The demos on this page are perfect, but I can't see any source for the actual demos: http://www.sideroller.com/wck/ (specifically demo 2 and 9)

(my main current problems are finding the normal of the character and the ground to find when the character is in the air/ no up normal, how to keep him from sliding on the slope, how to get him moving with instantaneous acceleration/deceleration. Also how to create complex objects from a list of points)

I've just been searching through the boards and manual, and playing with the source code in the demos, but stuck on a few things right now :/
(Also, do you have any good ways to learn to use box2d? Just from the demos and manual, or are there other good resources)
I'm the author of the demos you specifically mention (sideroller.com/wck). The source is all there. If you open up the demo flash file you can see that all the symbols are linked to classes, some of which implement what you are looking for. Look specifically at:

demo/BoxMan.as - Very basic character control (including finding the appropriate "ground" normal).

extras/WorldClickAdd.as
extras/CrayonSolid.as - Drawing & decomposing polygons during runtime.

These are meant to be example implementations, not the authoritative "this is how things should be done".
Awesome!

Thanks for the direction, I see it now, that will be a great help.

Aside from taking apart the demos, is there any other way to learn how to use WCK?
It looks like just following the same setup and making sure to make movieclips the same base class as the appropriate shapes?
I couldn't find much information on it aside from your main page and the GIT page, but it looks fantastic, and could be a great help by being able to setup levels using the flash IDE.

Thanks!
I've been working on the documentation here:

http://wiki.github.com/jesses/wck/world ... uction-kit

There's actually quite a few ways to set up shapes (besides extending shapes.* classes) depending on the situation.
Hmmm... for the normal solution, in the wck source it is done by:

Code:
var manifold:b2WorldManifold = null;
         var dot:Number = -1;
         if(!contacts.isEmpty()) {
            contacts.forEach(function(keys:Array, c:ContactEvent) {
               var wm:b2WorldManifold = c.getWorldManifold();
               if(wm.normal) {
                  var d:Number = wm.normal.dot(gravity);
                  if(!manifold || d > dot) {
                     manifold = wm;
                     dot = d;
                  }
               }
            });


            contacts.clean();
         }
if(jump && manifold)


but the standard as3 box2d 2.1 doesn't have the same type of functions- such as 'getWorldManifold()' needs to be passed a worldManifold- and I'm not sure what it is aside from what the documentation says:
"b2WorldManifold structure can be used to generate the world coordinates of the contact normal and points. You need to provide a b2Manifold...."

So class "blank1" is a class that depends on "blank1"... so how do I get blank to supply blank to finally get what the contact points and normals between two objects?

Is there some kind of documentation I'm not seeing for box2d aside from the manual? 😕
I've gotten way out of touch with the native port. But conceptually, a b2Manifold has points and normals in the coordinate space of the shapes, not the world. a b2WorldManifold will translate the manifold into world coordinates so you can compare it to gravity, etc. You're better off posting specific question in their own thread.

Original thread: https://box2d.org/forum/viewtopic.php?t=5476