Your repo
Inputs and labels
What your game plays with, how the check holds it to that, and how a game earns its Plays on and Plays with labels.
PushPlay games are played with a controller on the sofa, a keyboard at a desk, a finger on a phone, everyone’s phones at a party, or a phone swung like a bat. inputs in pushplay.json says which of those the whole game, menus included, can be played with.
"inputs": ["gamepad", "keyboard", "mouse", "touch"]
The values
| Value | Means | The check |
|---|---|---|
gamepad | A controller. Every screen, menus included, works with a controller alone. | The check notes (⚠) a game that leaves it out, unless it takes phones. |
keyboard | A keyboard. Enter starts, Esc pauses, and the keys reach every screen. | Plays the game with this alone. |
mouse | A mouse. Every screen works with the mouse alone: clicks, no hover, no scroll wheel. | Plays the game with this alone. |
touch | A touchscreen. Every screen works with taps alone. Needed for phone. | Plays the game with this alone. |
phones | Players' phones. Players join with their phones: a party game, or phones as controllers in any game. | Fails when the game doesn't take phones; ⚠ when it takes them and doesn't list them. |
motion | Phone motion. The phones' motion sensors: tilt, steering, swings. | Fails without phones and the kit's motion.js. |
camera | The camera. A camera watches the player, after the player allows it: the device's own, or with phones each player's phone. Video only, and the picture stays on the device that took it. | ⚠ when it is the only input: the game must play without a camera too. |
List only what really works, and pick what suits the game. Most games play with a controller, a keyboard, a mouse and touch. A motion game may play with phones alone and list just ["phones", "motion"]. The check holds the game to exactly what it lists: for a game on the runtime files, each listed input gets a pass of its own, played with that input alone, and a pass fails the build only for an input you listed.
controls is an older, separate field: "gamepad" once the game works with a controller, "keyboard-mapped" for one that doesn’t yet.
Labels are earned, never typed
Every game has two lists of labels, shown on its page and used by Discover and the Library’s filters. Nobody types them in: they’re worked out from inputs and from which of the check’s passes the game passed.
Plays on: the screens
| Label | Earned by |
|---|---|
| Phone | phone set in the manifest, touch in inputs, and a passing phone pass (Screens) |
| Tablet | touch or gamepad in inputs, or a game played with phones |
| TV | The check’s TV pass (Screens) |
| PC & handheld | The controller pass, or both the keyboard and mouse passes, or a game played with phones |
Plays with: the controls
| Label | Earned by |
|---|---|
| Controller | gamepad in inputs, and the controller pass |
| Keyboard & mouse | keyboard and mouse in inputs, and both passes, the mouse-only one included |
| Touch | touch in inputs, and the touch pass |
| Phones as controllers | "party": true, or a game that takes phones as controllers and passes that check |
| Motion | A game that takes phones and reads their motion (motion.js) |
Plays here
A game plays on a device when its screen matches and the device has one of its controls:
| Device | Controls it has |
|---|---|
| Phone | Touch |
| Tablet | Touch, phones |
| TV | Phones |
| Handheld (Steam Deck, Legion Go…) | A controller, phones |
| PC or Mac | Keyboard & mouse, phones |
Every device also has a controller once one is paired or plugged in. So a controller-only game is listed on a tablet or TV with Pair a controller to play, and a keyboard-and-mouse-only game doesn’t show as playable on a Steam Deck. A TV remote isn’t a control: it drives menus. A game’s page says it in one line, such as Plays on this PC with: keyboard & mouse · a controller · phones.
Every screen, every input
- A controller reaches everything. A controller has no hover, scroll wheel or typing, so nothing may depend on them. Anything aimed or dragged with a pointer needs a stick-driven way too.
- Show the right prompts. Draw button prompts for the device in use, and switch when the player picks up another.
window.pushplay.gamingModesays to start out showing controller prompts. - No dialogs.
alert(),confirm()andprompt()block controller input, and fail the check. Draw your UI in the game. - Text that reads on a handheld. The whole game must be readable on a 7–8” 1280×800 screen.
Keys PushPlay keeps
F10, Start + Select held together, and Esc held for one second open PushPlay’s own menu over the game (Resume, Restart game, Quit game). With a mouse or touch, PushPlay draws a ≡ button for it. Never bind these. A short press of Esc or Start is yours, and pausing is the usual thing to do with it. When PushPlay’s menu opens, it pauses your game (Runtime).
The standard button map
Games on the runtime files read every input as one set of buttons. If you write your own input code, matching it makes your game feel like every other PushPlay game:
| Button | Controller | Keyboard | Mouse and touch |
|---|---|---|---|
a |
A | Space, Enter | Click, tap |
b |
B | Backspace | Right-click |
x |
X | Shift | |
y |
Y | F | |
lb / rb |
LB / RB | Q / E | |
lt / rt |
LT / RT | Z / C | |
select |
Select | Tab | |
menu |
Start | Esc, P | The on-screen pause button |
Phones, motion and the camera
Players’ phones can be controllers in any game, a party game can be played on phones alone, a phone’s motion sensors can steer and swing, and a camera game can watch the player. Each has its own rules: see Party, phones and motion.
Edit this page on GitHub · Something missing or wrong? Tell us.