Gamepad/controller support

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Post Reply
PureTryOut
Engineer
Engineer
Posts: 3
Joined: 07 Dec 2011 19:38

Gamepad/controller support

Post by PureTryOut »

Couldn't find anything about this by extensive search, but please link me to it if it have been suggested before.

It might not be really logical for a game like this, but I would really like to see gamepad/controller support added.
Lately I've been looking into getting that "couch" experience with my PC, and Steam Big Picture has helped big time with that. OpenTTD however, has no way of working with a controller, except using external tools like Xpadder, or using the Steam controller. However, I would love to use my regular Dualshock 3 controller.

Has anyone looked into this before?
I think the GUI would need to be changed around when a controller is detected, and it should probably be better readable so you can sit further away from the screen, but it might be a really cool experience.

Yes I know I could just use the Steam controller (as I own one), but I much rather use a native controller interface then emulate a mouse and keyboard.
User avatar
DeletedUser10
Traffic Manager
Traffic Manager
Posts: 204
Joined: 01 Jun 2017 10:03

Re: Gamepad/controller support

Post by DeletedUser10 »

I use wii remote.
I installed wminput on my ubuntu, and then have fun with playing with that.
Maybe you could install the driver program.
Sent from my Ubuntu 16.04 LTS
User avatar
silpol
Engineer
Engineer
Posts: 11
Joined: 27 Apr 2004 17:27
Location: Espoo, Finland
Contact:

Re: Gamepad/controller support

Post by silpol »

Early June, 2024... just tried it on my Focal Ubuntu. Code is written for SDL v1, while OpenTTD is SDL v2 already for ages.

As API had been severely shaken, it's incompatible to blindly re-build with SDL2 Which means it needs re-writing and packaging for various platforms. Maybe another rainy day needed, for motivation to write code.
WenSim
Engineer
Engineer
Posts: 43
Joined: 02 Sep 2023 08:38
Location: Wenzhou

Re: Gamepad/controller support

Post by WenSim »

I know on windows you can use AntiMicroX, which should also be available on Linux. This is an external application that maps controller input to keyboard input, and should have no conflicts with OpenTTD.
Find me on GitHub or on Discord (wensimehrp, or WenSim)
Also find me via QQ: 1049170778, or email: wensimehrp@gmail.com
Green stuff here, may be helpful for content creators.
skc
Traffic Manager
Traffic Manager
Posts: 214
Joined: 17 Sep 2022 02:02

Re: Gamepad/controller support

Post by skc »

silpol wrote: 02 Jun 2024 11:04
Early June, 2024... just tried it on my Focal Ubuntu. Code is written for SDL v1, while OpenTTD is SDL v2 already for ages.

As API had been severely shaken, it's incompatible to blindly re-build with SDL2 Which means it needs re-writing and packaging for various platforms. Maybe another rainy day needed, for motivation to write code.
WenSim wrote: 14 Jul 2024 23:55 I know on windows you can use AntiMicroX, which should also be available on Linux. This is an external application that maps controller input to keyboard input, and should have no conflicts with OpenTTD.
It's available in the standard Debian repository, so it'll be available for Ubuntu.
In the Debian repository it's called "antimicro", and I'd imagine it's the same on Ubuntu.
WenSim
Engineer
Engineer
Posts: 43
Joined: 02 Sep 2023 08:38
Location: Wenzhou

Re: Gamepad/controller support

Post by WenSim »

https://github.com/WenSimEHRP/OpenTTD/tree/gamepad

Now I only have dpad and ljoystick scroll, and triggers zoom. I have a demo here: https://www.bilibili.com/video/BV1vBqZYXEaZ
I was using a dualshock controller, which has a trackpad.

EDIT: only tested on Linux. I'm not sure if it works on Windows or MacOS. Probably not.
Find me on GitHub or on Discord (wensimehrp, or WenSim)
Also find me via QQ: 1049170778, or email: wensimehrp@gmail.com
Green stuff here, may be helpful for content creators.
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: Bing [Bot] and 17 guests