[beh] Box2d+ (2.3.0 emscripten) [update: 2017-11-18]

0 favourites
From the Asset Store
Pack of illustrator graphic styles. Make your own logos, game titles, or anything you want.
  • Update: Gravitational attractor now added. There's an example on the above link (refresh to v1.0.0.3).

  • Hull shape editor now complete. This works how the c2 sprite polygon editor should have worked... Right click on a line to create a vertex; left click on a vertex to delete it. Download the json or copy it from a textbox.

    Here's an example:

  • Colludium - keep up the awesome work!

  • Thanks justifun!

    Platform behavior now complete. Here's a demo: link. Open it in a mobile and it'll give you screen controls, otherwise use the arrow keys to move. It's hardly a massive puzzle platformer, but you get the idea .

  • Added a helper function to check that a loaded polygon shape is not complex. Not long now....!

    Here's a demo of the editor capx: link

    Upload images and edit the collision shape, then download / copy the AsJSON string for the shape array.

  • Colludium - That custom collision box drawing is awesome. Can that be done at runtime? to build / change collision box shapes on the fly?

  • Colludium - That custom collision box drawing is awesome. Can that be done at runtime? to build / change collision box shapes on the fly?

    Thanks! Yes it can. I have an example where you can draw shapes - follow this link then click on the button at bottom left ("Draw Shapes") and you can see it in action. The hull is contained in an array of vertices that can be loaded directly into the plugin to form the outline (it loads as array.AsJSON). The plugin will include a capx of the editor and it will also have instructions that explain how to use it.

  • Instructions!

    The plugin will be ready in the next couple of days!

  • Is there way to retrieve joint data?

  • Unfortunately, Prominent, there are no methods in the library I am using to enable access to the emscripten joint reaction force values.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • This looks fantastic, can't wait to give it a try.

    Thank you very much for the great work!

  • Unfortunately, Prominent, there are no methods in the library I am using to enable access to the emscripten joint reaction force values.

    what about joint attachment x,y positions, and joint object uids?

  • I could add those easily, I think. What would you like to be able to do? Use a joint tag to get the UIDs of those attached by the joint, get UIDs of other objects attached to an object, get joint X and y positions by tag?

  • Might be worth looking at the chipmunk plugin. It has a ton of features for working with joints.

  • Prominent - good advice. I've now added the following expressions:

    • Joint anchor X. The anchor x position of the joint on this body.
    • Joint anchor Y. The anchor y position of the joint on this body.
    • Joint Type. The type of joint, using Box2D labelling. 0=unknown, 1=revolute, 2=prismatic, 3=distance, 4=pulley, 6=gear, 7=wheel, 8=weld.
    • Other UID. The UID of the other object connected in this joint.
    • Joint other anchor X. The anchor x position of the joint on the other body.
    • Joint other anchor Y. The anchor y position of the joint on the other body.
    • Joint anchor distance. The distance between the anchor points for each body in this joint.
    • Joint ratio. For gear and pulley joints, returns the joint's ratio.
    • Damping coefficient. For distance and wheel joints, returns the joint's damping coefficient.
    • Spring frequency. For distance and wheel joints, returns the joint's spring frequency.
    • Distance joint length. Returns the natural length of a distance joint.
    • Revolute angle limit. Returns the +/-angle limit, if set. Returns -1 if no limit is set.
    • Joint count. The number of joints on this object.
    • Joint type at Index. The type of joint at Index in the joint list for this object. 0=unknown, 1=revolute, 2=prismatic, 3=distance, 4=pulley, 6=gear, 7=wheel, 8=weld.
    • Tag at Index. The tag of a joint at Index in the joint list for this object.
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)