Inspiration

Most game consoles have multiple controllers controlling different characters in the same game. I wanted to change that around and have multiple devices creating a single controller.

What it does

A simple game is hosted on a node.js server. Any device that accesses the game with "/ascii_value" at the end of the URL will receive a page allowing that device to simulate the key ascii_value (so appending /37 to the URL lets that device act as a left arrow button for the game). The device does not have to be a phone, but the intention is to form a control panel with phones.

How I built it

The game is hosted on a node.js server using the Express framework. The real-time back-and-forth communication is done with the socket.io library.

Challenges I ran into

I could not figure out how to get external JS files to load with the game, so the entire game is within one HTML file. Wasting too much time on errors actually caused by spelling mistakes.

Accomplishments that I'm proud of

Getting the thing to work.

What I learned

  • Processing query strings in node.js
  • How to use the socket.io library

What's next for PhoneControls

  • Fixing the issue above with not being able to load external scripts.
  • More types of control inputs, like a trackpad or virtual joystick.
  • Cleaner style for controllers.
Share this project:

Updates