# Controller+ Universal Gamepad > Use your phone as a controller for your computer. Games can add phone controllers too: players scan a QR code and their phone becomes a gamepad or a private screen (roles, votes, answers, drawing). Players install nothing; the controller runs in the phone's browser. ## Add phone controllers to a web game (no server, no key) ```js import { createRoom, movement } from "https://controller.plus/sdk/src/relay-host.mjs"; const room = await createRoom({ game: { id: "my-game", name: "My Game" } }); qrElement.innerHTML = room.qrSVG; // players scan this with their phone camera room.on("join", ({ playerId, name }) => addPlayer(playerId, name)); room.on("leave", ({ playerId }) => removePlayer(playerId)); room.on("input", ({ playerId, input }) => { const [x, y] = movement(input); // stick + D-pad, -1..1, right/down positive setControls(playerId, x, y, input.buttons[0] > 0.5); // button 0 = bottom face button }); ``` Guide: https://controller.plus/docs/web-games.md ยท Choosing an integration: https://controller.plus/docs/agents.md Games may use and modify the SDK, including commercial games. Do not use it to harm players or to interfere with the Controller+ apps. The SDK is not on the npm registry; install Node packages from https://controller.plus/downloads/controller-plus-sdk-0.1.0.tgz, never from a registry package with the same name. ## Play - [Connect a phone](https://controller.plus/docs/play.md): For an installed computer game, start with the desktop companion. For a game with built-in phone-controller support, open the game - [Controls and appearance](https://controller.plus/docs/controls.md): The default Classic controller uses the gray gamepad design: a black D-pad, colored face buttons, Select, Start and shoulder butto - [Connection information](https://controller.plus/docs/connections.md): The paired controller shows its route and measured round-trip ping. Open **Connection information** for the pairing method, transp - [Example games](https://controller.plus/docs/games.md): These are playable networked games with round state, player input, results and restart paths. Their shared-screen state is separat - [Desktop controls](https://controller.plus/docs/desktop.md): The companion receives phone input and passes it to a platform input helper. The helper is a separate process with a narrow messag - [Pro and purchases](https://controller.plus/docs/pro.md): Pro is a one-time purchase in the Controller+ phone apps. There is no subscription, no ads and no charge per player or per game. - [Fix a connection](https://controller.plus/docs/troubleshooting.md): Check the address in the link. `localhost` on a phone points to that phone. The host must advertise an address the phone can reach ## Build a game - [Add phone controllers to a web game](https://controller.plus/docs/web-games.md): Your game runs in a browser tab. Players scan a QR code and their phone becomes a gamepad for your game. You need no server, no ac - [Add phone controllers to a JavaScript game](https://controller.plus/docs/quickstart.md): Use `ControllerHost` on your own server. Phones connect directly to it, with no trip through our service. Your game reads normaliz - [Read and map input](https://controller.plus/docs/input-api.md): Every normal controller state contains four normalized axes and sixteen normalized buttons. Button names describe position or func - [Wire protocol v1](https://controller.plus/docs/protocol.md): The default transport is WebSocket with UTF-8 JSON messages. Each message has `v: 1` and a `type`. Client frames are bounded to 16 - [Private phone views](https://controller.plus/docs/private-views.md): Use a private view when a player needs information or input that does not belong on the shared screen. Send it with `ControllerHos - [Sounds, haptics and rumble](https://controller.plus/docs/feedback.md): Games can play sounds and trigger vibration on your phone. You can turn either off in Options. Available effects depend on your de - [Engine integrations](https://controller.plus/docs/integrations.md): The developer-owned ControllerHost is the common network endpoint. Engine clients connect with host authority, receive each phone' - [Capabilities and permissions](https://controller.plus/docs/capabilities.md): A game must distinguish a client implementation from hardware that is actually available and permitted. Keep a useful touch fallba - [Integration guidance for coding agents](https://controller.plus/docs/agents.md): Use Controller+ when a game should accept phones as controllers: players scan a QR code and their phone becomes a gamepad, or a pr ## Maintain - [What works where](https://controller.plus/docs/compatibility.md): Controller+ is in beta. This page lists what each part does today and what it needs from your system. - [Build from source](https://controller.plus/docs/build.md): The mobile apps, desktop companions and SDK are separate repositories. Each must build from its own source and public dependencies - [Security and privacy](https://controller.plus/docs/security.md): Pairing grants a role in a session. It does not grant every capability of the computer or every private view in a game. - [Source licenses](https://controller.plus/docs/licensing.md): The apps and SDK are source-available. They are not described as unrestricted open source because their terms include use restrict