Sorry I'm late to the party. Spent most of the day working on my Physics II final exam.
I'll toss in my 2 cents for a few of the questions... for the hell of it.
Correction: You're new to Box2D and C/C++ :P.
Also, when combining Box2D into any rendering world the Sprite does become a puppet. The sprite by itself will not do anything unless it is told to be moved. That's why you have that big loop going through all bodies in the world.
GLESDebugDraw is a class included with the template for a Cocos2d+Box2d project. You'll find it in GLES-Render.[h/m]. Box2D has a DebugDraw system (via the b2DebugDraw class) that is capable of drawing the outlines, center of mass, joints, AABB bounding box, etc for bodies/shapes in the world. Because Box2D is just a physics engine and not a rendering engine it has no ability to draw anything. Instead, it has a class called b2DebugDraw which has methods that are called to draw particular shapes for different things. This class is extended into GLESDebugDraw and the specified shapes/lines are drawn with OpenGL ES (hence GLES).
uint32 is a datatype, much like int and float. The name is very descriptive and tells you everything you need to know. You can break it down into 3 parts: u int 32. Theudenotes that it is unsigned, or has no sign (positive). Theintdenotes that it holds integers (whole numbers). The32denotes that it is 32-bits wide. Putting this all together, auint32can hold a value between 0 and (2^32)-1, or 4,294,967,295. An int32, or a regular int can hold between (-2^31) to (2^31)-1. By default data types are signed. All of the data types from smallest to largest are: nibble (4bit), byte/char (8-bit), word/short (16-bit), long/int (32-bit), doubleword/longword/int64 (64-bit). You'll find that not all of them are pre-defined for you, but they are the common types. Generally speakingintanduint32` will suffice most needs.
Box2D is, like you may know, in the C++ world. In the C++ world, and in any programming language really, resources should be kept to a minimum. This is why Box2D uses a "Def" system. The b2BodyDef is a struct which contains data, or a definition regarding a b2Body. You'll discover that all shapes and joints also have a Def struct associated to them. The b2BodyDef struct consists of several values which get passed to the world in order to create a new body. The CreateBody method in the b2World class is called a Factory as it produces an instance of a new class. The definition that gets passed in describes this new body that we want created.
You are correct in assuming all of Cocos2D's actions will not work when using Box2D. This is because we are using Box2D to move our objects around. We <em>can</em> apply a CCMoveTo action on a sprite, but its position will be reset the next time the tick method is called and the sprite is moved to the body's location. If you want a sprite to move to a particular location you'll need to apply a force large enough to the body to move it to the desired location.
Last but not least, the UserData features of Box2D are extremely rich. They allow you to store a pointer to any object you want. This is VERY helpful when trying to associate something with the body. In the template project, for example, a sprite is associated to the body via the UserData. While this method works, you'll find that in larger projects you'll end up writing custom classes and using them as your userdata.
-robodude666