Getting more comfortable with Limelight

April 29, 2009 at 6:45 pm (Graphic Design, Limelight, Ruby, Week 6) (, , , )

OK, Limelight is starting to get fun. I’m finding my bearings in the framework, and I’m learning how to test different types of tasks. It’s really easy to do functional and view testing by adding a macro-style uses_scene :board call in RSpec (it’s built into Limelight as part of its spec_helper.rb). This gives you access to props on the scene that you specify. I’m also seeing some really awesome features of IntelliJ, which I’m learning to use better and am even starting to prefer over TextMate for the refactoring tools: Rename and Extract Method are two of my best friends at this point. Watching over Micah’s shoulder yesterday as he tracked down some Limelight source code, I learned the beautiful Command-Shift-N command to find files by name and autocomplete (like TextMate’s Command-T, which I’d missed very much).

The fact that all of Limelight’s code is in Ruby means there are lots of opportunities to cut down on repetition, which is especially welcome when it comes to Styles and Props (Limelight’s analog of the stylesheets and HTML elements we’d see in Rails). There are some tricks you have to be aware of to share data across files. There’s nothing like Rails’ passing of instance variables from controller to view, as far as I know. But luckily there’s an object called the production that everybody has access to, and we can add attributes to that object to hold data that needs to be available across files (in my case, references to the object that communicates with my Java code and some styling concepts).

And speaking of styling, I’m now armed with a handful of design-oriented links from my designer friends. Most are website gallery sites, but there’s a blog or two in there as well. Now, I’m not under any false impression that I’m suddenly going to be a designer by looking at some websites, but I’m sure I’ll improve. I have two Scenes (like views) in my application, and I’m relatively happy with the styling I did today on the first scene (the game type choices, like “Computer (X) vs. Human (O)”), but the second scene (with the board) definitely needs some work. I got a nice, simple color scheme from kuler.adobe.com, and I even did a little fade animation (you can easily change the transparency of props) as the scene begins.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: