{"id":20434078,"url":"https://github.com/renpy/steam-deck-guide","last_synced_at":"2025-04-12T21:11:45.483Z","repository":{"id":147092785,"uuid":"472045142","full_name":"renpy/steam-deck-guide","owner":"renpy","description":"Steam Deck Guide","archived":false,"fork":false,"pushed_at":"2022-05-16T03:13:45.000Z","size":316,"stargazers_count":18,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-26T15:21:19.524Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/renpy.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-20T17:00:44.000Z","updated_at":"2025-02-05T18:11:05.000Z","dependencies_parsed_at":"2023-04-26T09:23:48.579Z","dependency_job_id":null,"html_url":"https://github.com/renpy/steam-deck-guide","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renpy%2Fsteam-deck-guide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renpy%2Fsteam-deck-guide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renpy%2Fsteam-deck-guide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renpy%2Fsteam-deck-guide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/renpy","download_url":"https://codeload.github.com/renpy/steam-deck-guide/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631681,"owners_count":21136562,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T08:23:59.455Z","updated_at":"2025-04-12T21:11:45.469Z","avatar_url":"https://github.com/renpy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"**This is currently a draft. It might be incorrect, or it might be correct and\ngive bad advice. Here be dragons.**\n\n==============================\nRen'Py on Steam Deck - A Guide\n==============================\n\nThe goal of this document is to try to help Ren'Py games pass Steam Deck\ncompatibility review, and gain \"Great on Deck\" status, with a minimum amount\nof effort from the game's developer.\n\nThis isn't a complete guide to getting on Steam itself. There's a very good\ndocument, `Ren’Py Visual Novels on Steam: A Step-by-Step Guide \u003chttps://bit.ly/2VOH4vf\u003e`_ by\nBob Conway (bobcgames) that covers this process, that I won't repeat here.\n\nThis also isn't a direct substitute for Valve's `Steam Deck documentation \u003chttps://partner.steamgames.com/doc/steamdeck\u003e`_,\nespecially the sections on `How to load and run games on Steam Deck \u003chttps://partner.steamgames.com/doc/steamdeck/loadgames\u003e`_ and\nthe `Steam Deck Compatibility Review Process \u003chttps://partner.steamgames.com/doc/steamdeck/compat\u003e`_.\n\nRather, this is a discussion about how to make sure a Ren'Py game runs on Steam\nDeck and satisifies those guidelines. Where possible, I want to try to get the\ngame running  with minimal changes, though some games will require a re-release.\n\nLinux Build\n===========\n\nThe Steam Deck is running a build of Linux. Ren'Py is developed on Linux, and\nRen'Py runs well on Linux. It makes a lot of sense to uploade a SteamOS + Linux\nbuild of your game, and make sure that's the build that's submitted for\ncompatibility testing.\n\nI've seen some problem when running a Windows build through Steam Play and\nProton, and while it may work most of the time, having an unnecessary translation\nlayer isn't likely to help.\n\n\nController Support\n==================\n\nThe first requirement is that \"Your game must support Steam Deck's physical\ncontrols. The default controller configuration must provide users with the\nability to access all content. Players must not need to adjust any in-game settings\nin order to enable controller support or this configuration.\"\n\nRecommended Controller Mapping\n-------------------------------\n\nSince Ren'Py 6.99.6, Ren'Py games include native controller support for the\nXinput-style controller that is emulated by the Steam Input system. The\ndefault mapping of the controls is:\n\nRight Trigger, A\n    Dismiss dialogue, select buttons and bars.\n\nY\n    Hide the interface.\n\nLeft Shoulder, Left Trigger, Back\n    Perform a rollback.\n\nRight Shoulder\n    Perform a roll-forward.\n\nMenu/Start\n    Enter and exit the game menu.\n\nLeft Dpad, Left Stick, Right stick.\n    Navigate through the game's interface.\n\nIn addition to this, on the Steam Deck, it's suggested that the right touchpad\nmove the mouse around the screen, and pressing the right touchpad causes a click\nto occur.\n\n\nI'd suggest most games try to map their controllers in this manner, as consitency\nwill help players adapt to new games.\n\nRen'Py 6.99.6 and Higher\n-------------------------\n\nSince Ren'Py 6.99.6, Ren'Py has had built-in support for controllers, and\nthat support should work well with Steam Deck, and especially the \"Generic Gamepad\"\ncontroller configuration. To set this, visit `your dashboard \u003chttps://partner.steamgames.com/dashboard\u003e`_,\nchoose your game:\n\n.. image:: images/deck-1.png\n\nThen navigate to \"Edit SteamWorks Settings\":\n\n.. image:: images/deck-2.png\n\nAnd finally, navigate to \"Applications\", \"Steam Input\".\n\n.. image:: images/deck-3.png\n\nYou can then opt into the \"Generic Gamepad\" configuration, make sure all kinds\nof controllers are opted into Steam Input.\n\n.. image:: images/deck-4.png\n\nWhen you select \"Save\", your game should now support generic gamepad input.\n\n**Valve: Do they have to publish after saving?**\n\n\nRen'Py 6.99.5 and Lower\n-----------------------\n\n**Valve: How do I get the URL for a controller configuration that I created on te deck? Can it be shared between apps?**\n\nOlder Ren'Py games don't support the controller input. However, controller\nsupport is very similar to the way Ren'Py navigates games using the keyboard,\nand so it's possible to use Steam Input to map the Steam Deck's input to\nthe keyboard, allowing the game to be accessed.\n\n.. image:: images/deck-1.png\n\nThen navigate to \"Edit SteamWorks Settings\":\n\n.. image:: images/deck-2.png\n\nAnd finally, navigate to \"Applications\", \"Steam Input\".\n\n.. image:: images/deck-3.png\n\nFor the default configuration, choose \"Custom Configuraton (Hosted on Steam Workshop)\",\nthen \"Add Custom Configuration\", and then enter in the URL for the configuration.\n\nWhen you select \"Save\", your game should now support mapping the gamepad input to\nthe keyboard.\n\n\nKeyboard Support\n=================\n\nAnother requirement is that \"If your game requires text input (eg., for naming a\ncharacter or a save file), you must either use a Steamworks API for text entry\nto open the on-screen keyboard for players using a controller, or have your\nown built-in entry that allows users to enter text in their language using only\na controller.\"\n\n**Many games will trivially satisfy this requirement, by not requiring text\ninput.** In that case, great - you can ignore the rest of ths section.\n\nIf your game requires keyboard input - perhaps it prompts for the main character's\nname, what you need to do depends on the version of Ren'Py that you are running.\n\nRen'Py 7.5.0 or Later\n---------------------\n\n(Note that this version is not released at the time of the writing of this\ndocument.)\n\nNew versions of Ren'Py include built-in support for managing the Steam Deck\nkeyboard. Ren'Py will automatically determine if the floating keyboard needs\nto be show, and if text input is required, Ren'Py will show the keyboard.\nWhen text input ends, Ren'Py will shift down the keyboard.\n\nThere are a few variables that can be set to customize this\nprocess. These live in the _renpysteam namespace, which is the module that\nimplements them.\n\n\\_renpysteam.keyboard\\_mode = \"always\"\n    This should be one of \"always\", \"once\", and \"never\".\n\n    * \"always\" means the keyboard is always show when text input is requested.\n    * \"once\" means the keyboard is shown once per interaction. If the keyboard is hidden, it will not be automatically re-show. (It can be shown again with Steam+X.)\n    * \"never\" means the keyboard should not be automatically managed.\n\n\\_renpysteam.keyboard\\_shift = True\n    If True, interface layers (by default \"screens\", \"transient\", and \"overlay\")\n    are shifted upwards so the input text is visible to the user. The input text is shifted\n    up so that its baseline is aligned with \\_renpysteam.text\\_baseline. Input text is\n    never shifted down.\n\n\\_renpysteam.keyboard\\_baseline = 0.5\n    This is the baseline that input text is shifted to.\n\nThese can be set with the define statement::\n\n    define _renpysteam.keyboard_shift = False\n\nRen'Py 7.4.11 or Earlier\n------------------------\n\nTo use the floating keyboard with Ren'Py 7.4.11 or earlier, it's necessary\nto upgrade Ren'Py's steam support to the version included in Ren'Py 7.5.\nThis upgraded has been tested to work with Ren'Py 7.3.5 and 7.4.11, and will\nlikely work with some but not all older versions.\n\nThe upgrade may be performed on a Ren'Py SDK or an unpacked Ren'Py game\ndistribution. For the purpose of these instructions, the base directory\nis the directory with the renpy.sh or gamename.sh file in it.\n\n* Install any version of `Python 3 \u003chttps://www.python.org/downloads/\u003e`_ on your computer.\n* Download `update_renpy_steam.py \u003chttps://raw.githubusercontent.com/renpy/steam-deck-guide/main/update_renpy_steam.py\u003e`_ and place it into the  base directory.\n* Download the latest Steamworks SDK zip file from `Steamworks \u003chttps://partner.steamgames.com/dashboard\u003e`_, and place it into the base directory.\n\nThe Steamworks SDK should have a filename like steamworks_sdk_153a.zip. When\nready, your base directory will look like:\n\n.. image:: images/sdk.png\n\nYou'll then want to run update_renpy_steam.py. Make sure you run in in Python,\nnot open it in a text editor - you may need to right click and open with\nPython to be sure of this. When this script completes without errors, your\ngame or the SDK is updated. You should delete steamworks_sdk_153a.zip and update_renpy_steam.py so these\nfiles won't be distributed.\n\nAfter this step, you have the same Steam support that's included in Ren'Py\n7.5.0 and later, with support for the floating keyboard.\n\n\nVariant\n=======\n\nWhen the Steam support is at the 7.5.0 version (or upgraded as described\nabove), Ren'Py will define a \"steam_deck\" `screen variant \u003chttps://www.renpy.org/doc/html/screens.html#screen-variants\u003e`_ when the Steam Deck\nhardware is detected.\n\nThis can be used to select alternate screens, or checked with the renpy.variant\nfunction::\n\n    screen test():\n\n        vbox:\n\n            text \"Something common.\"\n\n            if renpy.variant(\"steam_deck\"):\n                text \"On Steam Deck.\"\n            else:\n                text \"On other platform.\"\n\n\nOther Requirements\n==================\n\nBe sure to check `valve's page \u003chttps://partner.steamgames.com/doc/steamdeck/compat\u003e`_ to make\nsure these requirements haven't been updated.\n\nController Glyphs\n-----------------\n\n\"When using Steam Deck's physical controls, on-screen glyphs must either match\nDeck button names, or match Xbox 360/One button names. Mouse and keyboard\nglyphs should not be shown if they are not the active input. Interacting\nwith any physical Deck controls using the default configuration must not\nshow non-controller glyphs.\"\n\nRen'Py does not display glyphs by default, so this requirement is trivially\nsatisifed. If your game displays glyphs, it will have to be changed to make\nsure the correct glyphs are displayed, perhaps using screen variants.\n\nResolution Support\n------------------\n\n\"The game must run at a resolution supported by Steam Deck.\"\n\nAll modern Ren'Py games adjust to the size of the window the game is\ndisplayed in.\n\nDefault Configuration\n---------------------\n\n\"The game must ship with a default configuration on Deck that results in a\nplayable framerate.\"\n\nThe Steam Deck hardware is fairly powerful, so this is unlikely to be a\nproblem. Please let the reviewers know that Ren'Py may vary the framerate,\nlowering it to save power on static scenes.\n\nText Legibility\n----------------\n\n\"interface text must be easily readable at a distance of 12 inches/30 cm from the screen.\nIn other words, the smallest on-screen font character should never fall below 9 pixels\nin height at 1280x800.\"\n\nRen'Py's default text is around 22px high at 1280x720, and text scales with\nwindow size. There should be ample margin for size changes.\n\nIt may make sense for some games to activate the small variant, meant for mobile\ndevices, when on a Steam Deck, using:::\n\n    init python:\n        if renpy.variant(\"steam_deck\"):\n            config.variants.remove(\"large\")\n            config.variants.insert(0, \"small\")\n\nThis could be the case if the game wants to re-use a moble UI on Steam Deck.\n\nNo Device Compatibility Warnings\n--------------------------------\n\n\"the app must not present the user with information that the Deck software\n(ie., specific Linux distribution) or hardware (ie., GPU) is unsupported.\"\n\nRen'Py doesn't perform such checks.\n\nLaunchers\n---------\n\n\"For games with launchers, those launchers also must meet the requirements listed here\"\n\nRen'Py games do not require a launcher to run.\n\n\nTroubleshooting\n===============\n\n*Typed text shows up as '1's.* This seems to be a problem with Ren'Py and Steam Play. It's suggested to create\na Steam OS + Linux build to ensure that input functions without a translation\nlayer.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenpy%2Fsteam-deck-guide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenpy%2Fsteam-deck-guide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenpy%2Fsteam-deck-guide/lists"}