I really liked Chrome's lightsaber experiment and, decided I wanted to try something similar with multiple inputs.

What it does

Two players enter, lots of balls spawn. Tap/click the screen to pull the ball towards the cursor, but keep an eye on your click power (the green bar), it recharges slowly! First to five points wins.

How I built it

By the grace of caffeine and the generosity of HackRice. But seriously, I used as a basic game engine, and made a duplicate p2.js physics engine running serverside in Node to sync game physics between players (could largely prevent cheating etc.), and information is passed back and forth using on each side for lightweight structured communication.

Challenges I ran into

Decoupling the prototype's physics from's internal engine was...problematic. Serving simple files with Node is way harder than I thought.

Accomplishments that I'm proud of

That it works at all! Seeing two devices in sync in realtime and knowing I built it all in 36 hours is a GREAT feeling

What I learned

The value of writing "bad" code to be "lifted up" into abstractions later, instead of trying to get all the abstractions right from the get-go. Cheers to an IRC friend for sending me some language design lectures that got me thinking along this line. I will write more "bad" code in the future if it leads to projects that work like this and are this much fun!

Share this project: