Commotion

by ynniv

Commotion is a realtime graphics system that I have been working on for
a while.  It’s Objective-C, OpenGL, and some Cocoa.  I had
started work on it in 2003 for Sha Xin Wei at Georgia Tech‘s New Media
Center
(in the LCC) as a text animation system.  We were working
on the next generation of Hubbub, and Commotion was meant to be a
replacement for ActiveText, a Windows / DirectX animation system by Jason Lewis.
Commotion has still not become as mature as ActiveText, and since Xin
Wei’s move to Canada, it has strayed from the original goal of text
animation to a more broad goal of realtime dynamic object management.

If I were to describe what Commotion does in 30 seconds or less, it would go something like this:

  • Provides a framework of bodies, properties, and services. 
    • Properties can contain any type of value, and will try to coalesce one
      value type into the type you request (obviously, this works better in
      some cases than in others) – very similar to an untyped programming
      language like JavaScript, basic, or python.
    • Bodies contain named properties, ie asking for its "color" property returns a property object.  They can also subscribe to services.
    • Services are bodies that have a list of consumers.  They tend to execute code when sent a message, like doEvent: nil named: @"update" generally does some type of iteration.
  • Organizes properties and bodies using a catalog service.  Catalogs can be nested, and know how to write themselves out to disk (in Apple’s Property List format, an XML schema)
  • Dynamically instantiates classes at run-time, based on an input catalog Property List.  Classes must be subclasses of ComService, since they’re going to be sent events.  Classes can be written in Objective-C or Python.
  • Provides a user interface for setting property values as well as organizing bodies, properties, and services

Leave a Reply