Thursday, January 24, 2013

CraftyJS examples

I've been pretty excited about learning more about JavaScript and HTML5 programming.  I've been working with CraftyJS, a cool game-design library for browser games.  I've mentioned a few of my projects before (e.g. Cairo, Evo, Teeming), but I've also been doing an independent study course this January with a student.  She's made great strides in working on this kind of thing.  As part of helping her learn this stuff, I made a couple basic demos, heavily commented, for CraftyJS; if you're looking for an easy way to do some pretty neat things in JavaScript, have a look at Invader and Platform - they're bare-bones and hardly games at all, but you can see even from these tiny examples that the library runs well.  View source to see the code.  Plenty of other information at the CraftyJS site.


  1. Nifty. I'm an EaselJS man myself, but this is fun.

    When I press up-arrow on "Invader", my ship leaps into the air and disappears forever. I think this is an awesome addition to Space Invaders. It's sort of Camus-esque.

    1. In this case, it actually was a bug in the library - see discussion here:!topic/craftyjs/geUU8qnucTQ

      I filed a fix at github, so hopefully this will go away in the next release. I could fix it in the demo, but I don't want to include some kludge when it's coded "properly" for what's supposed to happen.

  2. They just adopted my fix. Woo, big leagues.