Gravit is a free, visually stunning gravity simulator, where you can spend endless time experimenting with various configurations of simulated universes.


Within the source there is an Xcode project which takes care of almost everything for you, except for SDL and Agar.


At the time of writing, the latest stable version of SDL (1.2.14) has issues with setting fullscreen mode in Lion, but the development version has it fixed.

Compile a bleeding edge version of SDL from HG into a framework, due 1.2.14 using a deprecated function call. It caused a “CGDisplayBaseAddress is obsolete and returning NULL for display”. Using the latest from the HG repository solved the issue.

The other SDL libraries: SDL_image and SDL_ttf can just be downloaded and installed from the SDL website:

  • Download the "OS X Binary" of SDL_image, e.g. SDL_image-1.2.10.dmg
  • Download the "OS X Binary" of SDL_ttf, e.g. SDL_SDL_ttf-2.0.10.dmg
  • Put the extracted Frameworks in /Library/Frameworks


Agar libraries need to be compiled and installed in your system. The Xcode project currently refers to statically built libraries in /usr/local/lib to exist.