Archive for the ‘Uncategorized’ Category


Behind the scenes of TiMo C2

Yes, ‘C2′ is my nickname for TiMo’s new core, it sounds sufficiently modern and exciting. In fact, what started as a mere core rewrite is becoming more of a complete overhaul of the whole thing. It turns out that there were a large number of things wrong with TiMo C1, and pinning new code onto the old code to fix all of those things is just not feasible. A quick warning before I start, this post is very very geeky, and will probably make absolutely no sense to people without experience with object oriented programming. Here are the goals and accomplishments of this rewrite:

Goal #1: Basic new features

In a way, this rewrite had to happen no matter what, since you can never really know what features a program needs until you’ve played with it a bit. When I first wrote TiMo C1, I completely forgot about important features like the ability to select and move around multiple objects at a time. So much of TiMo has been built around the idea that only one object would be selected (the inspector, the guide system, even the UI), that adding in the ability to select multiple object would have taken a week or more, and even then been buggy. Other features that C1 didn’t/couldn’t have that C2 does/will include multicolored guides, the ability to move and animate the ‘camera’/viewpoint, the ability to rotate objects (that’s one of those “well duh” things that I had completely forgotten about until months into development), a large number of powerful hotkeys, and more.

Goal #2: Code Efficiency

TiMo C1 was pretty much my first Xcode project ever, right after “Hello World”. So, as you can imagine, memory management and code efficiency were not exactly my chief concern, no, my chief concern was “Hey, look at me, I’m an Xcode programmer now!”. Just about everything in C2 is more efficient, from the core all the way up to the UI (which I’ll talk about later). Possibly the biggest change in C2 is the completely new way of linking Items and Layers. ‘Items’ are the entities that store the properties of an object and handle keyframing. ‘Layers’ are what show up the editor, in other words, what you see. In TiMo C1 these were completely separate, the only way you could find the layer corresponding to a certain item (or vice-versa) was by searching through an array for an object with the same name. The thing is that Layers get all of their instructions (where to go, how big to be, what colors to draw, etc) from the Item, so every time you changed a frame or resized an object TiMo would have to look through the array as many as a hundred or so times. This was, as you can imagine, slow. Furthermore, the actual code that drew the objects into the layers was completely separate from the code that handled their properties, which lead to very messy code and a very messy plugin architecture.

I admit it, TiMo C1 was pretty awful, playing even simple animations could take as much as 50% of my processor power. TiMo C2 has a completely different approach to this. Items have direct pointers to their corresponding layers, and likewise, layers have direct pointers to their parent items. No more searching through arrays. Also, each type of object has it’s own subclass of  ’Item’ now, so all of the drawing code is right next to the keyframing code, and any object with special properties or requirements can implement that cleanly by overriding some functions. This not only makes my job easier, but now plugin development gets simplified from multiple protocols to just one subclass.

Goal #3: UI Efficiency

TiMo C2 has a lot of UI changes, many that you can see (the new Library view, for example), and many that you cannot (like the newly recreated editor). All of the new stuff goes by a new philosophy, “Use a lot of layers”. The library view, for example, is comprised of 49 layers. The reason for having so many layers is that nothing ever has to be redrawn. In the old TiMo, many large controls (like the timeline) were drawn into one layer, so every time you resized them, the entire layer had to be redrawn. The new library uses a lot of different layers with CALayerConstraints to automatically move them around, instead of redrawing them. Moving layers is handled by the graphics card, redrawing them is handled by the processor, so my new methodology makes TiMo run many many times faster (especially on newer machines). The same methodology was applied to the editor view in TiMo C2. The editor used to have 1 ‘overlay layer’ on top of all of the user layers that drew things like guides, rulers, and drag handles. That meant that every time you moved an object, the entire overlay had to be redrawn, which was the main reason why moving layers took so much power. In TiMo C2, everything has it’s own layer, even individual guides, so that hardly anything ever needs to be redrawn.

Goal #4: Clean Code

TiMo C1 had been through 3 complete UI overhauls before I abandoned it. There were about 20 full code files and hundreds of other methods that where no longer in use, remnants of old UIs. Not only that, I kept tacking on new features to the core, instead of having them be part of it from the start, so there was code strewn everywhere (it sort of resembled my bedroom, in a way). Unlike my bedroom, I’m making an effort to keep everything in the right spot, and get rid of things I don’t need anymore.

And there you have it, if you understood everything I just said, you have a lot of patience and a lot of coding experience. Congratulations :p -Keaton


My goals in life

In no particular order:

  • Be the top result of every google search imaginable.
  • Find a plot hole in reality
  • Write an autobiography of someone else, just to prove that the actual meaning of words doesn’t apply to me
  • Become the next Shakespeare by writing a 1000 page book comprised entirely of adjectives
  • Have a party where literally everybody in the world is invited, travel expenses paid
  • Get the phone number: (481) 516 2342
  • Write a song so beautiful that it makes Chuck Norris cry
  • “Set” the “world record” for “number” of “air” quotes “used” in “one speech”
  • Become a role model to myself
  • Legally change my name to “Señór Choolo”
  • Discover that The Hitchhikers guide to the Galaxy is actually non-fiction
  • Read the rest of this entry »


TiMo UI Demo Video!

Me showing off a bunch of TiMo’s new features, like it’s new Timeline, Inspector, and Library! You can see the animations in action, which is like porn for geeks. That’s hot!
By the way, sorry for the poor picture quality, I’ll make it better next time, promise!


Redesigning TiMo’s interface

Surprisingly enough, the hardest part of software development is not the code, but the interface. Even a Windows developer would admit that the way a user interacts with the code is just as important as the list of features, although clearly this is not a rule that they generally enforce with their own apps. Mac apps, however, have a very high and exacting standard for UI design. TiMo poses an especially big challenge: Fitting an entire animation tool in a small space, while keeping it easy enough for grandma to use with only a few minutes of training. I’m currently working through a major redesign, here’s what I’m up to:

Read the rest of this entry »


New Site

Yeah, I admit it, that last re-design wasn’t much of an improvement over the lack of a website that it replaced. This is take 2, with a more modern design backed by a powerful CMS (You’ll never figure out which … unless you look down a bit). It’s got a blog now, but you knew that already, or at least I hope you did, if not then you can’t possibly be reading this, which is impossible since you just read that. You little trickster you.

Hmm, writing all of this is a surprising amount of work. I should probably just have used Lorem Ipsum. The problem with that is that I have no idea what Lorem Ipsum is, it could be some satanist prayer for all I know, and I’m not entirely sure I want to be associated with that. I wonder if there’s some group of satanists somewhere just laughing at all of the accidental convert web designers.

Ok, just wikipedia’d it, turns out ‘The text is derived from Cicero’s De Finibus Bonorum et Malorum (On the Ends of Goods and Evils, or alternatively [About] The Purposes of Good and Evil)‘, or so they claim. Maybe this is some giant conspiracy, because really, does anybody speak latin anymore?