Page 1 of 1

Gamepad/controller support

Posted: 07 Dec 2015 13:48
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.

Re: Gamepad/controller support

Posted: 04 Jul 2017 09:35
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.

Re: Gamepad/controller support

Posted: 26 Jan 2023 16:37
by trainf

Re: Gamepad/controller support

Posted: 02 Jun 2024 11:04
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.

Re: Gamepad/controller support

Posted: 14 Jul 2024 23:55
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.

Re: Gamepad/controller support

Posted: 15 Jul 2024 04:13
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.

Re: Gamepad/controller support

Posted: 15 Dec 2024 21:13
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.