Pew

Created in 36 9 hours for MHacks 8. Artificial reality laser tag game, using the phone's GPS and compass sensors. Players would point their phones at their target, and "shoot" using a button on-screen. Used Bing Maps to display a map of other players in the game, colored as to which team they were on. To add defensive strategy, players could also heal (although slower than they could take damage). Hosted on Azure, powered by Node.js. You can see a screenshot of the game on the right.

Initially, the plan was to use Arduino modules with built-in Bluetooth LE to communicate with players' phones. Players would hold 3D printed gun chassis and shoot at each other using concnerated infrared beams, much like conventional laser tag. However, by 24 hours into the event, we were not able to get the infrared receiving working. Bluetooth pairing was fine, and the companion app on the phone was plenty far along, but we were stuck. Infrared signals need to be "demodulated" in order to understand what the sender was intending to do - the communication happens as rapid flashes of invisible light, and these high/low signals can be interpreted. The Arduino boards we were using had a different type of clock and timing than other boards, and therefore there wasn't any off-the-shelf software we could use to get the infrared communication working. We even tried chaining to other boards which were far more standard, but the models varied and we still failed to get it working.

Rather than give up, we decided to start over on a solution that worked purely off the phones, in the browser. Starting at midnight of the last day, I created the structure of the app with Andrew, and we created a functional game. The final product is functional and fun, accomplishing much of what we had hoped to do with the Arduino project. I initially used Google Maps to visualize where the players were on the field and where their teammates were, but found that it was slow to load and often didn't load at all. By contrast, Bing maps worked reliably and was easy to integrate into the project. We presented to Microsoft employees in our consideration for the "best use of Microsoft technology" award.

All in all, I'm proud of what we accomplished in just a fourth of a hackathon. If we decided to ship the game, I would create a matchmaking system that grouped players based on others that were playing in their area. I would also like to experiment with using three.js for a 3D view of other players, making the game more immersive. AR games are an interesting and unexpected consequence of the smartphone revolution. It was fun to get an inside look at how they can be made.

Tools & Frameworks
bing maps
gulp
express
chrome location api
websockets
azure
Programming Languages
node.js
html
css
javascript
Tags
mhacks
hackathon