I found a video from last year's WWDC which included scripts to do this. At least I'm in now and can do some debugging.
Topic:
Graphics & Games
SubTopic:
General
Tags: