Howdy! I've always wanted a way to play OpenTTD on the go. Through its development life so far, it has been a strictly keyboard + mouse game, and mobile device ports have generally not been an enjoyable experience (I've been trying them out for the last 10 years).
Connect your controller, launch the game, and open the Controller -> Controllers & Mapping menu. Find your controller in the dropdown, click "Map Controller" and press the appropriate buttons as directed. Controller is remembered across restarts, making it usable in a SteamOS couch setup and on handhelds without needing a mouse or touch input.
D-Pad and A/B are able to navigate most buttons, windows, widgets, toolbars.
L-Stick moves the cursor with A as left click, X as right click
R-Stick moves the map (and can be used simultaneously with other actions, such as drag building)
Shoulders are Ctrl + Shift
Triggers are zoom
I have reasonable hobbyist level programming experience, and enough of an understanding of best practices that I figured I could train and direct a local AI agent to add these features to my own fork of OpenTTD.
Repo Disclaimer: OpenTTD prohibits upstream PR's of AI generated code changes. Builds and source are available in the linked repo and you are encouraged to do your own due diligence.
AI Disclaimer: The code writing itself was done entirely using the local agent, with full supervision and direction from me. Trained on best practices from the OpenTTD contributing and codingstyle .md files to retain similarity. Every build was manually tested on every platform before release.
If you test this with gameplay loops (setting up transport routes / managing a large save file) please share the device, configuration, and screenshots! If you find bugs, please report them in the repo Issues.
My vision for what's next is improving touch input with buttons to toggle necessary keybinds, and eventually a dual screen mode for devices such as the Thor and Duo which moves the toolbar and date/news/bank to the bottom screen.
https://github.com/TechEdison0/OpenTTD-Handheld/releases/tag/v1.0