Processing Minimal Scenegraph
I’ve been thinking recently about Processing and animation. One of the really nice things about it is that it lets you build up visuals from the ground up, from fairly minimal amounts of code and basic shapes. Contrast this with Flash (ActionScript 3.0) where immediately you are using complex objects with a display hierarchy built-in.
Of course, it’s nice to eventually got to some sort of display hierarchy, where you have a system in place for rendering out visual “objects.” At some point, you don’t want to draw rectangles anymore, you really want to start mucking about with complex combinations of shapes and movement. You could graduate towards a real, industrial-strength rendering engine, something like the open source games engine AndEngine (for Android), or something even more powerful and confusion, but there’s not a lot of middle ground. (If there is, please share!)
What I’ve tried to do here is start up a compromise between an engine like AndEngine and, well, the pure basics of drawing things to the screen pixel-by-pixel. I’m calling it Processing-Scenegraph,” and before you jump all over me and tell me it’s not a real scenegraph, well, I know… a proper scenegraph would have transformation nodes and color nodes and probably a compiler that stored local/global transformations in each node and updated when nodes were added/removed. Etc etc etc. But this version is designed for teaching, to be straightforward but also useful to those students starting out with games design and programming, and artists looking to make more complex animations using programming.
Hopefully you’ll find it useful, and please send feedback and post comments, it’s an open source project, after all!