This project has moved. For the latest updates, please go here.

XNA => Create a blob'ish circle with texture?

Topics: User Forum
Jul 20, 2012 at 3:42 AM
Edited Jul 20, 2012 at 3:58 AM


a couples days ago i started experimenting with Farseer, which is a simple and awesome engine in my opinion.

However, now i want to create a blob like Circle for one of my 2D game but i can't seem to figure out to do it and how to use texture with it.

By blob like i mean like a tenis ball or stress ball that we can squeeze for example.

Could anyone point me to the right direction please?


Thanks in advance!

Jul 20, 2012 at 7:15 PM
Edited Jul 20, 2012 at 7:18 PM

Search for "soft body box2d" and you will find several methods that you can port to Farseer. The most common is a mass-spring system where the masses are circles and the springs are distance joints.

In the TestBed there is PathTest.cs that will give you an idea of how it would look like (done with revolute joints).

JBox2D (the java port of Box2D) has a ConstantVolumeJoint that can be quite easily ported and is made for soft bodies.

Note that Farseer is a rigid body engine so simulating soft bodies is not easy and requires a lot of tuning. If your game is heavily dependent on soft bodies I can recommend Bullet (BulletSharp) but it's a 3D engine.