explaingit

yyx990803/socket-play

Analysis updated 2026-07-17 · repo last pushed 2011-11-26

13JavaScriptAudience · vibe coderComplexity · 3/5DormantSetup · moderate

TLDR

A demo that turns your iPhone into a wireless controller for a browser-based HTML5 game using WebSockets, no app install required.

Mindmap

mindmap
  root((repo))
    What it does
      Phone as controller
      Real time game control
      Proof of concept
    Tech stack
      Node.js
      Express
      Socket.io
      Three.js
    Use cases
      Prototype phone controlled games
      Multiplayer phone controllers
      Arcade style browser games
    Audience
      Vibe coders
      Game prototypers
    Limits
      Same local network
      Old iOS era demo

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Prototype a game controlled by tilting a phone instead of a keyboard.

USE CASE 2

Build a multiplayer browser game where each player's phone is their controller.

USE CASE 3

Create an arcade-style demo using phones as wireless input devices.

USE CASE 4

Learn how WebSockets sync real-time input between two devices on a local network.

What is it built with?

Node.jsExpressSocket.ioThree.js

How does it compare?

yyx990803/socket-play09catho/axonabdulrdeveloper/react--tic-tac-toe
Stars131313
LanguageJavaScriptJavaScriptJavaScript
Last pushed2011-11-26
MaintenanceDormant
Setup difficultymoderatemoderateeasy
Complexity3/54/51/5
Audiencevibe coderresearcherdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Both the computer and phone must be on the same local network.

In plain English

Socket Play is a demo that lets you control an HTML5 game running in a web browser using your iPhone as a wireless controller. Instead of a keyboard or mouse, you tilt and interact with your phone to move and control a character or object on a computer screen. The way it works is relatively straightforward. You start the application on your computer by running a few simple commands that launch a server. Then you open a web browser on your computer to see the game itself, and separately, you visit a special controller page on your iPhone's Safari browser. The two devices communicate wirelessly over your local network using WebSocket technology, a method that lets them send messages back and forth instantly. When you tilt your iPhone or tap the screen, those movements are detected by the controller page and sent to the game, which responds in real time. This was built as a proof-of-concept demonstration to show what's possible when you combine a few existing web technologies: Node.js for the server, Express for routing, Socket.io for the live communication between devices, and Three.js for 3D graphics in the browser. The creator mentions that MongoDB support is included but isn't necessary to get started. You'd use this if you wanted to prototype an unusual game input method, imagine multiplayer games where each player uses their own phone, or arcade-style experiences where the phone becomes the controller. It's particularly clever because it uses technologies already available in mobile Safari circa 2011, so you didn't need a dedicated app. The main limitation is that both devices need to be on the same local network, and it was designed when iOS and browser capabilities were much more limited than today.

Copy-paste prompts

Prompt 1
Help me run socket-play locally and connect my iPhone as a game controller.
Prompt 2
Explain how socket-play uses Socket.io to sync phone movement with a browser game.
Prompt 3
Show me how to adapt socket-play's controller page for my own HTML5 game.
Prompt 4
Walk me through the Node.js and Express server setup in socket-play.

Frequently asked questions

What is socket-play?

A demo that turns your iPhone into a wireless controller for a browser-based HTML5 game using WebSockets, no app install required.

What language is socket-play written in?

Mainly JavaScript. The stack also includes Node.js, Express, Socket.io.

Is socket-play actively maintained?

Dormant — no commits in 2+ years (last push 2011-11-26).

How hard is socket-play to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is socket-play for?

Mainly vibe coder.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.