Base code declaration
I’m going to be building a JavaScript/HTML5 game and put together some scaffolding for the following tools:
- TypeScript, which will be a first for me (in previous LDs I used CoffeeScript). Seeing syntax/type errors as soon as I save the file is going to be a big timesaver. I wanted to try Facebook’s newly released Flow typechecker, because it does deeper type inference and thus provides value even without type annotations, but it doesn’t yet support handy ES6 features like classes and the fat arrow.
- howler.js for cross-browser, low-latency sound effects and music.
- jQuery for DOM manipulation. I typically need some of that, if only for hiscore lists and such.
- SASS (SCSS, actually) and Bourbon for CSS3 convenience. It’s a slight change from the previous LD, where I used Compass, but I’ve found it’s slower to compile.
- Inkscape. I use the command line export function to convert them to PNG on the fly. If I need sprite sheets, I’ll just draw them into a single SVG; makes it easy to get a consistent set of sprites, too.
- oggenc and lame to convert WAV files to OGG and MP3 for the various browsers. Chrome only eats MP3 but not OGG, Firefox eats only OGG but no MP3. What a pain.
And the best part: an old-fashioned Makefile to rebuild assets when needed, and a tiny Sinatra web server to run make before it serves up the asset. It means I can just refresh the browser, and everything I see will be up to date. This has worked very well for me in the past; for any other JavaScript participants out there, I highly recommend that youset up something similar or just steal my code.