SandboxSystem is a project mainly written in Java, it's free.
A framework for building systems simulations using a construction metaphor on a 2D grid