Tuesday, January 19, 2010

Physics Is Fun With A ...

An old joke from my undergrad days, hardly a joke really, but we'd say it with big goofy grins "physics is fun with a p-h." Get it? I know, I know, it's not funny, it actually borders on terrible, but it was fun, and it was a cynically optimistic thing to keep us going during long nights of studying. There were others of course: chemistry is cool with a c-h; biology is ... um ... about animals? Anyway, imagine my surprise when I stumbled on this:



That's right, it's a program called Phun. Now, try to imagine my surprise when I find out what it is. According to its website:
Phun is an educational, entertaining and somewhat (!) addictive piece of software for playing around in a 2D physics sandbox in a cartoony fashion. Phun is not just another game, but is intended to bring in interactive physics as an enabling technology for entirely new concepts and usage patterns in creative computing for animation, simulation, narrativity, engineering, art and education.
That's right, its a sandbox game with the sole purpose of showing the world that physics is indeed fun with a p-h. More importantly, it's actually a bad ass little piece of software. It lets the computer handle all of the 2D physics models while on top you can go as crazy as you'd like. The user interface contains collapsible menus with various tools. At first it may look like gimp or (sigh, the non-open source) photoshop, with all the art looking tools. It has the pencily tool, a circle maker, a box maker, etc etc. So in seconds you can make an army of squares, circles, and various bird shaped demons. From here the actual fun begins (no I'm not going to be an idiot and spell it with a p-h throughout, I'm a nerd, but I still have my standards), right click on a shape you created and you can set all sorts of its variables. You can change its density, its friction constant, its bounciness, and so on so forth. From here you can attach things together or use hinges to make wheels, or attach springs (along with setting spring constants) to create complicated machines.



To give you an idea of what you can do in this game. When I was back home my brother set up a situation in space, basically no Earth gravity, where he had a single circle that was set to destroy everything it touched except for the surrounding walls which destroyed the little ball (let's call it the killer comet from now on). Well as the comet flew through space he'd make massive circles to try and pull the comet away from the walls. See the massive circles had some major gravity, that would pull the comet towards them, space physics remember. Sometimes the comet would be going so fast that it would take a few planets to pull it back, but this would be drastic, the comet would come hurtling towards the planets and crash right into them, destroying them flat out (since it's the killer comet remember?) and sending the comet towards another wall. To which he'd have to make more planets to draw it back, because remember the walls kill the comet.



This to me is what sandbox games are all about. You decide what your goals are, not the programmer. This is also why I love sandbox games, especially ones as well put together as Phun. If I want to build a huge machine that hurls rocks at a wall until it tumbles down after a few hits, then by god I can (provided I have the creativity and the time to do so). This is a sandbox in the way that Garry's Mod is a sandbox, not like Grand Theft Auto is supposedly a sandbox. You're not given any direction here, just you and your imagination loose in a world that takes care of all the math and complications for you. Almost as if you're given access to a room full of legos and a control switch for the gravity, air resistance, and weight of each block.



Some people may become quickly bored with this setup of  having no predetermined goals, and I do admit to not ever spending hours on end with Phun. After 30 minutes to an hour I'm usually sated and I move on, but this isn't a bad thing. If anything it reminds me of the fits of creativity I'd have as a child. To the sandbox I'd go where after the bulldozer dug a hole, built a castle, fought a dinosaur, and finally got buried in the sand I was distracted by something else outside of the little sandbox. That didn't mean I never came back, in fact it wasn't long before I had plans for a better castle, a deeper hole, and a longer dino battle. This is exactly the kind of hold Phun can have. I suggest checking it out if you enjoy such things, you might need a goodish computer to run it, but the newer versions seem to run much better on older computers. It's free, has versions for windows, mac and linux; and can be found here. Here's a video showing off some of the things that can be done in Phun:



An example of some of the crazy contraptions you can make in Phun:



And a marble adding machine:


2 comments:

  1. Wow... Just, wow... This sounds amazing. I mean, it sounds like the perfect thing for science classes in schools where students are old enough to finally be learning about such things. And I'm sure it'd be more effective as busy work than a damn cross-word puzzle.

    ReplyDelete
  2. Absolutely, and for the curious among us who, while learning physics, wonder things such as "what would happen if you dropped an anvil on a very springy trampoline?" can get a fairly accurate answer quickly and in a very enjoyable manner. If someone did a similar thing for 3D physics it would be a very impressive thing indeed.

    ReplyDelete