Skip to content

imluri/netpad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

netpad

Turn your phone into a wireless Xbox 360 or DualShock 4 controller for PC games — over local Wi-Fi. Up to 4 players at once, each with a fully customizable on-screen layout.

Phone running netpad as a controller for Split Fiction on the TV

Features

  • Per-phone controller type — each phone connects as Xbox (XInput) or PlayStation (DS4), chosen at join.
  • Up to 4 controllers on slots 1–4.
  • Customizable touch layout — drag to position, slider to resize, presets (Xbox / PlayStation / Minimal) or build your own from a Blank canvas using the element palette. Save, export (.netpad), and import layouts.
  • Rich controls — sticks (fixed or floating/dynamic zones), d-pad, A/B/X/Y, bumpers, analog or digital triggers, Start/Back, a center Home/Guide button, combo (chord) buttons that hold several inputs at once, and the DS4 touchpad (drag + click) for PlayStation.
  • Live monitor at /monitor — every connected phone mirrored at its real screen ratio with live input.
  • Connection debug at /debug — measures HTTP and WebSocket latency.
  • Low-latency transport — WebSocket by default (with automatic HTTP fallback), selectable per connection.
  • Landscape-only with a rotate prompt.

Prerequisites

  1. Windows PC (the ViGEm Bus Driver is Windows-only)
  2. Node.js 18+https://nodejs.org
  3. ViGEm Bus Driverhttps://github.com/nefarius/ViGEmBus/releases
    • Download the latest ViGEmBus_Setup_x64.msi and install it. No reboot needed — it works immediately after installing.

Setup

cd server
npm install
node server.js

The server prints your PC's local IP:

netpad running → http://localhost:3000
Connect phone  → http://192.168.1.42:3000

(Find your IP manually with ipconfigIPv4 Address under your active Wi-Fi/Ethernet adapter.)

Connect Your Phone

  1. Put your phone on the same Wi-Fi network as your PC.
  2. Open the printed URL (e.g. http://192.168.1.42:3000) in your phone's browser.
  3. Enter a name, pick Controller (Xbox / PlayStation), a Slot, and Connection (WebSocket recommended), then tap Connect.
  4. You drop straight into your last-used layout and start playing. Hold the phone in landscape.

Tip: on iOS, use Share → Add to Home Screen for a fullscreen, app-like experience.

Layouts

The connect flow loads your last-used layout automatically. To change or build layouts, open ⚙ Settings on the controller screen:

  • Adjust Layout — edit the current layout (positions, sizes, options).
  • Layouts — switch between saved layouts, start from a preset or Blank, or import/export.

In the editor:

  • Drag an element to move it (snaps to an adjustable grid).
  • Tap an element for its controls: a size slider, plus per-type options.
  • Sticks: toggle Floating (touch anywhere in a zone to spawn the stick at your finger) vs Fixed.
  • Triggers (L2/R2): toggle Analog (drag for pressure) vs Digital (tap).
  • Palette (left panel): tap a control to add it; + Combo creates a chord button (pick the buttons it fires together).
  • Remove sends a control back to the palette.
  • Save As to name and keep a layout; Export writes a shareable .netpad file.

Monitor & Debug

  • /monitor — open http://<pc-ip>:3000/monitor on the PC to see every connected phone's layout light up live (buttons, sticks, d-pad, touchpad, combos), each mirrored at its real screen ratio.

    The /monitor page showing two players' live controller layouts

  • /debug — open http://<pc-ip>:3000/debug (or tap Connection debug on the join screen) to measure HTTP vs WebSocket latency and confirm WebSocket connectivity.

    The /debug page comparing HTTP and WebSocket latency

Tested With

  • Split Fiction (co-op, 2 controllers)

Troubleshooting

Problem Fix
"ViGEm Bus Driver not found" Install the driver (no reboot needed) and restart node server.js
Phone can't reach server Confirm both devices are on the same Wi-Fi; allow port 3000 through Windows Firewall
Controller not detected in game Press a button first (some games/testers only reveal a gamepad after input); check joy.cpl (Win+R → joy.cpl) for the virtual device
Input feels laggy Use the WebSocket connection mode, stay near the router, and check /debug for latency
Stuck on "Rotate your device" The app is landscape-only — turn the phone sideways

Releases

No releases published

Packages

 
 
 

Contributors