Relaxatron V2.0 Now Available in the App Store

The Splash

Version 2.0 of Relaxatron is available on the Apple App Store. We built a completely new drawing system, and now Relaxatron displays fluffy clouds. "Relax with your head in the clouds." Check it out in the Apple App Store

The Geekspeak

The rendering engine has been totally re-built to use OpenGL. The old version of Relaxatron used UIBezierPath animation, which was very awesome and super easy to put together. The OpenGL rendering engine was not so easy. Not even close.

But, the benefit is that the game simulation can compute new cell patterns, then hand those off to the rendering engine which draws the cells in different, cool ways. Right now we have the "classic" look - polka dots - and the new "cloud" look. The clouds are rendered using a particle system and animating textures. It was fun to put together.

Other lessons learned along the way: how to manage threaded drawing. While all actual drawing of the VBOs is done on the main thread, building the cell geometry is done on a background thread. We built it this way for performance reasons. Everything started out on the main thread, but building the new cell geometry takes around 20msec, which is too much time to maintain 60fps. Now the geometry building and the rendering are interleaved. The code is more complicated, but the work was worth it.

We wrote all the simulation, all the geometry building code and the OpenGL rendering code in C++. The big fat idea here is to make these portions cross-platform. The native parts of the code handle the UI (the views and buttons), and the threading. Using native code for threading was a little bit of a surprise, but good cross-platform threading libraries don't really exist. Unless you want to go through JNI and Boost, which seems to defeat the purpose of using threading to improve performance.