Texture Atlas Creator

November 1st, 2010

Daniel over at Sparrow wrote up an article on how to use the flash based texture atlas creator I built. I figured I would at least put a public link in here so that folks can find it. Here’s the link


Scoping in javascript

October 11th, 2010

Not sure why I don’t see more addressing this on the internet, but when you make an object in javascript and want to call the methods it contains via event listeners all the method calls fall out of scope, making instance variables out of scope as well. I have done all kinds of weird things to get around this in the past, until one of my coworkers set me up with this method:

function CreateDelegate(object, method) {
return (function() { return method.apply(object, arguments); })
}

Nice to have easy to use and light. I don’t need to import any external libraries.


Sparrow Framework

September 22nd, 2010

I’ve been playing around with the Sparrow framework which is pretty amazing. I like Apple’s framework for dealing with forms and data driven content, but when it comes to graphics their stuff on it’s own feels really mixed up. Most of the time I am wondering if I should be using Quartz or Core Animation and end up finding that what I need to do is just best handled in OpenGL. Sparrow handles a lot of boilerplate things, it’s very fast and best of all it integrates well with apple’s other components. If you just want an interactive scene that does a lot of 2D stuff you just add it as a subview and start/stop as needed. It has easing, audio, fonts and movieclips, is modeled off the flash display hierarchy (which I think is flash’s biggest selling point) and even adds in event listeners.

The code for Sparrow is very very cleanly written, and is lean enough to look through but seems to hit all the core features I would want. I also found it a lot easier to start tinkering with their libraries than I did with cocos2D. The start up documentation gets you up and running in a matter of minutes. With all the drama about flash and the crap performance this is really a nice solution that plays nice with the rest of Apple’s framework.

Kudos guys.


Zipping files in AS3

July 14th, 2009

Just tried out a nice zip library. This one was easier to use than fzip although fzip may offer some features I’m unaware of. Super handy with flash 10 to have this available as the local file load/save feature is limited to one file at a time. Now you can just pack up a compressed file with all of your assets and save that. I can also see potential for putting bulk site assets in one zip file and preloading them that way.


Recycle Slam!

June 13th, 2009


Just built a new 8-bit style video game for SF Environment.