Box2D Blob Skeleton

This week in nature of code, we talked about using a physics engine to build a skeleton for an onscreen character. Two projects we referenced are:

Karsten Schmidt’s Nokia Friends and Elie Zananiri’s Big Screams.

Both of these projects involve an underlying skeleton (Nokia Friends uses toxiclibs verlet physics and Big Screams uses Box2D) that serves as the structure for a cute, cuddly, jiggly creature drawn on top. In my efforts to expand the nature of code materials this semester, I’ve released a new example that demonstrates this technique. It constructs a skeleton of out Box2D bodies and distance joints and draws a curvy polygon with eyes and mouth on top.

Source: BlobSkeleton.zip
(Requires pbox2d: https://github.com/shiffman/PBox2D

  • freecookies

    Hi Daniel, I’ve new to programming and recently been trying to tackle this exercise with a few hiccups along the way. Any chance I could get some help and advice? Thanks

  • Themadhatter

      in blob class, where “bd.type = BodyType.DYNAMIC;”  error- bd.type cannot be resolved or is not a field

  • shiffman

    make sure you are using most recent version of pbox2d

  • http://twitter.com/DavidKinross David Kinross

    On a Mac Download the most recent version of pbox2d from here: http://www.shiffman.net/p5/libraries/pbox2d/pbox2d.zip
    Then put the downloaded unzipped “pbox2d” folder into this directory [your user account] > Documents > Processing > libraries. Then Close Processing down and reopen it and you should be good to go!