sandbox physics & evolution explorer

I'm working on a sandbox physics & alife project:

http://www.sandboxphysics.com

It's a work in progress, but can be fun to tinker with.

You can draw boxes, circles, and freehand. You can add ropes, chains, motors, and hinges. And there is a simple shape duplicator, and a psychedelic paint mode and wireframe mode.

You can also add "food" and try to evolve a creature that gets closest to that food. There's a rudimentary creature save/load feature.

I'll be adding full scene save/load and a host of other features. At some point, I'll upgrade to the 2.0.1 version.

Check it out and let me know what you think! 🙂
Great work! Really fun to play with!
Do you plan to go open source with it as some point?

Martin
Cool. I noticed some instabilities with the grid of boxes. What is the size of the box you are sending to Box2D? There seems to be some tuning problems.
The evolution mode is really interesting. I'm going to keep my eye on this to see where it goes...

It would be cool if the "fittest" creatures were picked by the user, rather than proximity to the food. Maybe even allow the user to pick more than one creature to "breed" (multiple parents). Just a thought.
@Erin: The size of the boxes in grid mode is 20x20. The floor and sides are quite bouncy, and everything spawns with random friction, restitution, and density, so maybe that's why it seems unstable? When I view it in wireframe mode, it looks OK. I plan to add sliders to let people control new object properties.

@circinus: Yes, if I get approval from my company I want to open source it once it's further along. There's quite a bit more planned to make scene creation easier.

@mayobutter: Good ideas. I do have plans for expanded evolution options to let users pick and evolve the creature's phenotype as well as using different genetic lines/parents. The evolver can plateau too easily right now. There's also a bit too much randomness at the moment, so I'm planning on adding spines/skeletons and behavior "genes" like darwinbots. The creature VM also needs a lot of tuning.

swift
I would try to make the boxes use meters instead of pixels. See this FAQ for an explanation:

http://www.box2d.org/wiki/index.php?title=General_FAQ

That should improve stability.
Erin, I do plan on using meters when I upgrade to 2.0. I'm curious though: what is the instability that you noticed? To my untrained eye, it looks fairly stable. It'd be good to know in case I run into it again with larger bodies.

(I had problems with the chain and rope exploding until I set their densities high as recommended by you in another thread.)
When I create a grid of boxes some of the boxes in the middle will rotate back and forth.

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