coolRunnings: older updates.

retained for historical purposes only

don't believe a word of this:

Older updates

As of 9/5/09, the call to the smush.it image optimizer has been removed. Instead, PNG optimization is carried out on the server. (Thanks, Stoyan) This should improve response time.

As of 7/29/09, I've committed the ugly hacks to the bitbucket repo. This means that you are looking into the workroom when it's in need of a thorough cleaning. However, the tool does work, and you can make it work on your local box by doing the following:

  1. Grab the latest version (coincidentally the 100th commit), either via hg, or by downloading a zip/gzip from bitbucket.
  2. Unpack in a web-facing directory.
  3. Make everything executable, and make the coolrunnings/public_images directory writable by the web user.
  4. You need to change exactly two things: in coolrunnings/library/Bootstrap, lines 33 and 34, change the WebRoot and RootUrl to suitable values. If you set the RootUrl to localhost, you won't be able to pass sprites to smush.it, but you will still generate sprites.
  5. You should now be able to point your browser (or wget) at http://yourUrl/coolrunnings/index.php?... and receive a sprite in return. In particular, if you're hacking on SpriteMe, you can point all the generator calls at your local machine.

I'll be publishing a roadmap soon. The immediate goal is to refactor the current sloppy codebase.

If you feel compelled to suggest something in the meanwhile, feel free to hit the bug tracker at bitbucket, or just email me; I'm friendly and approachable.

As of 7/22/09, the absolute-coordinate generator is up and running. It's being used in Steve Souders's SpriteMe tool. I'd love to hear from anyone interested in using it in their own front-end tool, adding features or collaborating on further development.

Please note that the version at bitbucket isn't exactly the version running on the web. I've accrued some technical debt over the last couple of days. When the code is beta-ready, I'll create a 1.0 version that should be installable by just untarring and editing a config file.

Many enhancements are planned. Check back at this page for major updates. Following the Atom feed at bitbucket is one way to stay informed. I may or may not continue blogging about technical matters; articles seem more my style. At any rate, I plan to collect any articles or blog posts I write about coolRunnings here.

How to use the absolute-coordinate generator:

send an http request to http://jaredhirsch.com/coolrunnings/index.php?format=[json|image]&absolute={foo} where {foo} equals, for example:

{"canvas":
    {"name":"ghosts-a-plenty",
     "height":75,
     "width": 222, 
     "background-color":"gray",
     "comments":"normally you would save sprite coordinates in here"},
     "images":[
        {"url":"http://www.namcogames.com/iphone_games/images/blinky.png",
        "top":10,
        "left":10},
        {"url":"http://www.namcogames.com/iphone_games/images/pinky.png",
        "top":10,
        "left":63},
        {"url":"http://www.namcogames.com/iphone_games/images/inky.png",
        "top":10,
        "left":116},
        {"url":"http://www.namcogames.com/iphone_games/images/sue.png",
        "top":10,
        "left":169}]}
Of course, you would have different values for all these properties.

About the format option

If you pass it the format=image option, the service returns an image directly.

If you pass it the format=json option, the service returns the URL of the image, instead of the image, in script form, like this:

var coolRunnings = {"url":"http:\/\/example.com\/foo.png"}

brought to you by jared hirsch