Archive for December, 2007

Pocket Physics!

Sunday, December 23rd, 2007

Did you ever sit on the bus and think “Damn, now I could really use a program that treats my drawings as physical scenes and simulates the interaction between objects on them!” ? Well, me neither, but here’s one anyways.

You can design scenes freely by drawing things with the stylus. Things can be solid, like ramps and floors, or dynamic, like balls or boxes. Like in The Incredible Machine, you can reset the scene, change it, and start the simulation again. It’s even more fun if you have a DS Motion, which can be used to control gravity!

Here’s what it looks like:

Pocket Physics Domino

As you can see, the main inspiration comes from Crayon Physics :)

Some implementation details for those who care: For the physics simulation I used the Box2D library by Erin Catto (DS port here). For graphics, I’m using μLibrary by Brunni, which allows for fast drawing of 2D objects using the DS’s 3D capabilities. The background image is One for SXC by Felipe Skroski. The crayon texture was made in GIMP, and the sounds were recorded on my DS with NitroTracker :)

Get it from the project homepage and tell me what you think of it in the GBADev Forum or via comments.

Box2D for the DS

Sunday, December 23rd, 2007

As you know, physics is the new 3D. So why not just ditch the 3D for the good old 2D? 2D was much cooler anyways, and a lot of games that were fun in 2D became quite annoying in 3D.

This is where Box2D comes in. It’s a very easy to use 2D physics library with a growing set of features. Box2D got a lot of attention from the game Crayon Physics that showed the potential of the library. Unfortunately, it is not perfect for the DS, because it uses floating point math, which the DS’s CPUs don’t support. So, I decided to create a DS port with fixed point math. Check it out, it’s really easy and a lot of fun!

box2d-1.4.3-ds2.tgz

Update:
The fixed point and Nintendo DS patches are now part of the official Box2D SVN! If you want to use Box2D on the DS, just check out the latest version from SVN. Also, check out my DS physics toy Pocket Physics.


Bad Behavior has blocked 199 access attempts in the last 7 days.