Phun (2D Physics Sandbox)



Phun is a 2D physics engine created by Emil Ernerfeldt for his master thesis while he was studying at Umeå University in Sweden. It is based on the Constructionist learning paradigm, and free for non-commercial use. On May 15, 2008 Phun was taken over by Algoryx Simulation AB, where Emil continues his work on the program.

Overview
Phun is a 2D physics sandbox written by Emil ErnerFeldt for his Master of Science thesis at the Umeå University in Sweden. It is based on the SPOOK linear constraint solver by Claude Lacoursière. It is written in C++, and uses GLEW, SDL, and Boost (including Boost.Filesystem).

The name "Phun" is a combination of "physics" and "fun", and the built-in programming language is called thyme.

History
The first public beta of Phun was released on December 17, 2007, and received regular updates. The current official update as of now is beta 5.28.

Phun Beta 5 was renamed to "Algodoo: Phun Edition" after Phun was taken over by Algoryx Simulation AB. Algodoo is now available to the public, and has already been made available for the Intel Classmate PCs. The current edition became freeware on march 2013. and demonstrated at the 2009 BETT event in London. Beta 5 work is now complete, and is available at phunland.com.

Gameplay
Phun is a sandbox physics program, which heavily concentrates on giving players just enough tools to envision their ideas. There is no set objective, and only basic tools. However, complicated devices can be built such as walkers, engines and transmissions.

Thyme
Thyme is a scripting language created by Emil. It can be used to load scenes and alter variables within the program ranging from the strength of gravity to the color of the background. Like many games, phun features a console window (opened with ~) which allows users to enter thyme code. The console uses an auto-complete function and structure type organization system, where only the scope will be shown when auto-complete is called (using tab).

User created content
Phun has a wide range of community-built tools, including converters for BMP, SVG, blend and AutoCAD formats. Phun 4 had many user-made addons such as "Phun Gears", which allowed users to add gears into their scenes, although this feature has now been implemented into Phun 5. The source code for Phun 5 has not been released yet due to phun commercializing, so no addons can be made for phun 5.

Phunbox
The Phun community shares scenes under a creative commons 3 by-nc-sa license at phunbox, a community-built filesharing website. Users allow others to use their work, abiding by the CC3 by-nc-sa license. The phunbox has now been replaced with the algobox, where it includes content created in Phun and in Algodoo.

Reception
Phun has been discussed and shown extensively on the internet, as well as being demonstrated at the Intel Developer Forum 2008 in San Francisco. It has also been displayed on the 2009 BETT show in London.

An article about Algoryx and Algodoo has been published by TechWorld. (Swedish).

Physicsworld.com reviewed Phun on Jun 2, 2009.