Steam Deck
A game for the Steam Deck is a Linux build uploaded to its Linux + SteamOS depot (Upload to Steam). Once the game is on Steam, Valve tests it on a Deck and gives it a rating:
| Rating | Means |
|---|---|
| Verified | Works well with the Deck's own controls and screen. |
| Playable | Works, but the player has to do something extra, such as use the touchscreen for a menu. |
| Unsupported | Does not work on the Deck. |
Valve's list of what it checks is in Steam Deck compatibility review. It covers four areas; here is how each applies to your game.
Input
The Deck's buttons, sticks and D-pad reach the game as a gamepad, the same one an Xbox controller is on a PC.
- Gameplay: movement (
axis), looking around (look) and the gamepad buttons (PadA,PadB…, as keys in events andgame.input.isDown('PadA')in scripts) work with it already. The A, B, X and Y buttons also press on-screen buttons 1 to 4. - Menus: the player must be able to use every menu without the touchscreen. Give each menu canvas a First selected (Controller and keyboard): the D-pad or stick then moves between buttons and A clicks. A menu that only works by touch makes the game Playable, not Verified.
- Button prompts: if your game shows which button to press, show gamepad buttons while one is in use, never
keyboard keys. On input device changed and Input device is (
game.input.devicein scripts) follow what the player used last (Button prompts), and<prompt=jump>in UI text switches by itself. On a Deck the prompts show the Deck's own buttons (A B X Y, L1 R1, ☰ ⧉) by themselves; Valve accepts Xbox-style ones too, and the Deck's A, B, X and Y are where an Xbox controller's are. - Steam Input: in Steamworks, set the game's default controller layout to a gamepad one (Steam Input settings), so the Deck's controls arrive as a gamepad. The same goes for controllers on Windows with Steam Input on: the Windows player reads the pad Steam hands it. With a keyboard-and-mouse layout the game gets keys instead of a pad. To try it before your game has a Steamworks page, open the Steam overlay in the running game (Shift+Tab or the Xbox button) → Controller layout → Templates → Gamepad.
- Typing: an Input field opens Steam's on-screen keyboard by itself when the player starts typing in it with the Deck's controls, so a name entry or chat box needs nothing extra. On Windows it does the same in Big Picture or with a controller in hand; what is typed goes into the field, and Enter on it submits a one-line field.
Display
- The Deck's screen is 1280 × 800. In Build → Linux, choose that window size. The Canvas Scaler fits the UI to it; a 16:10 screen shows a little more than 16:9 at the edges, so keep the UI anchored to the corners and edges it belongs to.
- Valve wants all text readable on the 7-inch screen: at least 9 pixels tall at 1280 × 800, and 12 if you can. Check your smallest text in a 1280 × 800 window, above all on canvases set to Constant pixel size.
- On the Deck, Steam shows the game full screen by itself.
Seamlessness
No launcher, no warnings about the device: Steam starts the game straight away, and Steam button → Exit game closes it. Nothing to do here.
System support
- The Linux build runs natively in Steam's Linux runtime, the container the Deck runs native games in.
- The Steam button opens the overlay, and achievements, stats, leaderboards and the player's name work as on Windows (Steam on Linux).
- To carry saves between a PC and the Deck, set up Steam Cloud.
- Use
game.steam.onSteamDeckfor anything only the Deck needs (a different default quality level, say).
Testing without a Deck
- Build for Windows or Linux with a 1280 × 800 window.
- Plug in a gamepad and put the mouse away.
- Play from the title screen to the end: every menu, pause screen and dialog must work with the gamepad alone, and the selected button must be easy to see.
- Read the smallest text from arm's length.