Sep 12 2011

Back to the Future!

I have finally come to the conclusion that a rewrite in Cocoa is now unavoidable. The Carbon code base is nearly unmaintainable, so any further bug fixes or enhancements to Fractal Domains must be addressed in this new Cocoa version. In order to make this possible in a timely fashion, I don’t have the luxury of taking time to create a complex new architecture;  the previous approach to a rewrite must be discarded and a new approach must be adopted.

The primary goal of this initial rewrite is to reproduce the functionality of the original as much as possible. All user interface elements will be new, of course, and OS X features will be leveraged: for instance, the current multi-processor support will be completely replaced with something more appropriate (and less buggy). Code will only be re-used where absolutely appropriate.

It is a requirement of this rewrite that all parameter files that were created by the current version of Fractal Domains will be usable by the new version and will generate the same image. (I may not extend this capability to files with saved dwells, although the parameter info will still be accessible.)

In addition to the currently supported fractal types. some new fractal types will be introduced, although the exact types offered is still TBD. I’m pretty sure “flame” type fractals will be in the mix.

The rewrite is already well underway. When the current functionality of Fractal Domains is implemented in the new version, I will probably make an “alpha” version available so that current Fractal Domains users can take advantage of any bug fixes that will be made. As far as current bugs go, there are no showstoppers in the current (2.0.11) version but there are some annoying glitches: when zooming and previewing images, there are sometimes some errors in the image due to imperfections in the multitasking implementations. The errors do not show up in the final image, and the bug has already been fixed in the new rewrite.

These bugs will not be fixed in 2.0.11 but a free update to the rewrite version, Fractal Domains X, will be available to all current owners of Fractal Domains. For those of you who might be thinking about purchasing Fractal Domains, you can wait for the new version, but if you do buy the current version you can use it now and you will be upgraded at no cost to Fractal Domains X, having the same status as a new buyer of Fractal Domains X. In fact, I may decide to raise the price slightly (although I have not made a decision on that yet) in which case you might save some money by buying Fractal Domains now.

The one caveat is the system requirements: Fractal Domains X will only run on OS X 10.6.x (Snow Leopard) or better. If you don’t run Snow Leopard and can’t upgrade to Snow Leopard, you won’t be able to run Fractal Domains X. This is not an arbitrary decision. Anybody who has followed the development of this program over the years knows that I have tried to maintain backward compatibility with older systems as much as possible (I still have a version available on my site that runs on OS 9!). However, there are simply so many OS X features that were first introduced in Snow Leopard that enhance the capabilities of Fractal Domains X that it would significantly detract from the program if I could not use these features. These include:

  • New options for concurrency (i.e. Grand Central Dispatch, blocks in Objective-C, etc.). In order to support OS X versions older than Snow Leopard, I’d have to write two versions of everything: one with GCD and one without. This isn’t really practical.
  • OpenCL — a general programming language for leveraging the massive array of processors available in modern GPUs (Graphics Processing Units, i.e. your video card). I am very excited by this development, and although the fact that I want to fast-track the first version of Fractal Domains X means that there may be little OpenCL support in the initial version, I want to eventually move the application over to heavily or completely using OpenCL for fractal generation. One of the great things about OpenCL is that it allows you to target your regular multi-core CPUs as well as GPUs.
I did conduct a poll a while back that indicated most Fractal Domains users were using Snow Leopard or planning to upgrade — and that was well over a year ago. So, I hope not too many people will be disappointed or inconvenience by this restriction.

In conclusion: now that I’ve embarked on this project, I’ve discovered that a large portion of what I was intending to accomplish with my original very general design can be done within a simpler design that is not such a large leap. Also, if I had proceeded with the original rewrite plans it might be much harder to incorporate technologies such as OpenCL that have come along since then. So, it may have been a fortunate thing for the future of Fractal Domains that its future was postponed this long.

– Dennis De Mars (info@fractaldomains.com)