Disasteroids: How we built a real time gravity-based space shooter in 48 hours for the 2012 Node.js Knockout — Part 1 of 4: Countdown and Kickoff
T-Minus 48 Hours
On Wednesday afternoon we made a trip to the airport.
Since the last Node Knockout some 15 months ago, 3/4 of the team had moved from Santa Monica to Boulder, CO to get involved with TechStars, but our fourth man @bundy_kim was flying in from LA for a couple days of brainstorming and wandering around town before the start of the competition.
We are all avid gamers, but had never built a game of our own before, and decided that the NKO provided a great opportunity. We considered a handful of different ideas, but settled on a modern adaptation of the classic artillery games. In short order we knew what we had to add: space, missiles, robots, and real time multiplayer.
T-Minus 24 Hours
If we learned anything from last year’s NKO, it’s that a little planning goes a long way. We spent the afternoon at the whiteboard, mapping out the game mechanics and prioritizing features: gravity, collisions, and shooting had to happen for us to have a game. Things like weapon variety, a scoreboard, and strategic game types would be cool, but only if we got done with the core features in time.
More than once an office mate would walk by and stop to see what we were staring at so intently, only to break into a broad grin as they realized what we were up to.
T-Minus 5 Hours
On our way back to the office after lunch, we ran into a couple Red Bull girls handing out free samples. This was a good omen.
T-Minus 4 Hours
We headed to Alfalfa’s, the local grocery store, for snacks and supplies. With the exception of some not-so-healthy energy drinks, we actually picked up some pretty solid food. Despite the conventional wisdom, you probably don’t want to be running on pizza for two straight days of hacking. We opted for corn chips, salsa, protein bars, beef jerky, trail mix, and lots of green tea-based beverages. All in all it seemed to work fine. We each got only 5-6 hours of sleep over the weekend, and didn’t have any major crashes or bouts of exhaustion.
T-Minus 3 Hours
In the final hours before kickoff, we held one more meeting to decide on architecture, map out specific tasks, determine which libraries we would need, and get a rough idea of who would be responsible for each item. We’re very fortunate to have a team with lots of skill overlap, so we knew it would be useful to set rough boundaries so we didn’t step on each others’ toes.
git clone was run and we were off to the races.
I (@travhimelf) fired up Illustrator while the other guys (@bundy_kim, @joshonthweb, and @mtoymil) started installing the important modules and libraries we would need. I went to File > New Document, and Illustrator promptly decided to give me the pinwheel of doom. I briefly considered downloading Inkscape but decided it was best to not mess around, and set about installing a fresh copy of CS6.
While I waited for a fresh install, I Googled around for Mobile Frame Zero models (go ahead and browse for 20min, I’ll wait…), which I thought would make good reference material for our mech designs.
There’s plenty of mech art on the web, but most of it is uber-detailed — lego models made better references because they’re built with simple polygons. We had been toying with the idea of 16-bit-style art, but ultimately headed in a Geometry Wars direction after looking at this awesome style breakdown on Quora and deciding that we’d better keep it simple. (After all, none of us had ever designed game art before.)
For the animations I looked at sprite sheets from NES classics like MegaMan. The designers of those games achieved some pretty smooth looking sequences using only a handful of frames. We didn’t get a chance to implement walking around the surface of asteroids, but it was cool to get some rudimentary animation experience under my belt.
With the artwork well underway I decided to check in with Bundy, who was tackling the first major feature, and the key to the game design: gravity.
Check back tomorrow for Part 2, where Bundy walks through our implementation of radial gravity and the technologies behind it.
If you enjoyed disasteroids.com or this post, please consider throwing us a vote on our team’s page. It requires Facebook authentication to ensure that there isn’t rampant cheating, but the awesome NodeKnockout organizers @visnup and @gerad would never use your information in a malicious way. They’ve been crazy enough to organize this event for the 3rd year now despite the operational headaches of putting together such a massive event.