Squishy - updates

Just wanted to post the following video showing the progress on my Box2D game, Squishy:

http://www.youtube.com/watch?v=_k87Ybaz8tY

It's written in C++ using DirectX 9. You swing your soft-bodied hero around a level using two gooey arms (fired with the left and right mouse buttons), picking up objects to use to hold down Portal-style floor buttons, open doors and avoid buzzsaws.

It is still very much a work in progress but I thought there had been sufficient progress to merit a new topic on this forum.

Development details are here: http://www.gamedev.net/community/forums/mod/journal/journal.asp?jn=408620
Nice work! I look forward to playing it.
Cheers, Erin. None of it would have been possible without Box2D so thanks to you and everyone else who has worked on it. 🙂

Demo will probably have to wait until GameDev sort out the site upgrade since I don't have any other webspace and their is sooo slooooow at the moment.
Just wanted to bump this as made lots of progress since I created this thread. Plenty of YouTube links in my journal:

http://www.gamedev.net/community/forums/mod/journal/journal.asp?jn=408620

Box2D continues to be the magic that makes it all possible. 🙂
Nice work man!

Just one question, its quite dumb i thik, but how you draw your joint? i unsing box2d with cocos2d for iphone and some times i want do something like that that =/
badawe wrote:
Just one question, its quite dumb i thik, but how you draw your joint? i unsing box2d with cocos2d for iphone and some times i want do something like that that =/


Do you mean the arms? They are just a triangle mesh with a circle sprite on one end. The vertices of the triangle are moved up and down and in and out based on the length of the arm.

This image shows them drawn in wireframe mode, which should explain it:

Image


HTH Paul
Awesome work man! really good!

I try make some joint with userdata (Sprite) sometime before, and can get this work.
And i try draw a rectancgle between this 2 desired points, but i can't get the right angle!

But amazing work! I hope you can release your version soon!
badawe wrote:
I try make some joint with userdata (Sprite) sometime before, and can get this work.
And i try draw a rectancgle between this 2 desired points, but i can't get the right angle!


The vector solution is quite easy, assuming you have a basic knowledge of 2D vector maths. If not, please post for an explanation.

If V is a 2D vector from point A to point B, and N is the normalised version of V, you can construct the following vectors:

L(-N.y,N.x);
R(N.y,-N.x);

where L is a unit vector pointing at 90 degrees anti-clockwise from V and R is a unit vector pointing 90 degrees clockwise from V.

So, from point A, to find either corner of the rectangle, if w is the rectangle width scalar, just add L*w to A and R*w to A.

Similarly, add the same to point B to find the two corners adjacent to point B.

Quick picture:

Image

So with just a vector normalisation, some flipping and negating vector elements and some vector addition and multiplication, you can plot a rectangle around any given line. This is how I work out the basic shape of the arm in my project.

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