May 20, 2013

AngelHack 2013 Wrapup

This last weekend, I participated in AngelHack 2013.

I wasn't sure what to expect from AngelHack going into it.  I'd found out about it on Thursday, and after much hemming, hawing, and gnashing of teeth, I decided to go for it.

I'm used to a GiveCamp-style model, where you've got your project well-defined in advance, but for this one I was able to decide for myself what I'd do within their restriction: your code must be completed within 24 hours.

I decided I'd use the opportunity to learn some "new-to-me" technology, specifically WebRTC's peer-to-peer data capabilities.  However, I quickly found out that adoption isn't what I'd hoped.  Yes, it's in Chrome and works, and the Firefox nightly builds, but IE10 requires a plugin that won't talk with Chrome or Firefox, and mobile support is truly lacking.

So I shifted my focus to a partial WebRTC polyfill.  I wanted it so that if either the browser did not support WebRTC or could not tunnel to the "host" machine for the p2p session, then the systems would fallback to a lightweight server interface.

I managed to get something working in about four hours, and built a simple multiplayer game to demonstrate the technology.  I'm not going to link to my demo as I hadn't put any security in place and I know of at least a dozen major security holes in my hack, but I'm happy.  The characters were generated using the Charas character generator.  I built a simple Perlin noise level generator to allow the world to be passed around using only four bytes, and I drew the tileset and even had support for animated terrain (water and lava flowed).

We had up to seven people running in the same game world, with the world being hosted on a Kindle Fire HD 8.9", and players on Windows Phone 8, IE10, Chromium on Linux, Firefox, and more.  For some reason, it wouldn't work on the Fire HD 7" or Nexus 7 that we had nearby, but that happens when you only have twelve hours of development time.  The judges weren't the target market for the polyfill, but the other developers who were there were really impressed and at least three were interested in using the polyfill once complete.

So what next?  Well, the polyfill is going to require a lot more work to be released to anyone, and seems like a good evening project, and actually finishing a small game and demonstrating it reinvigorated me, so back to "SiN Episode 0."