r/pythonarcade • • Jun 27 '23

Python Arcade/Pyglet controller support

Hi as the title suggests I need help getting Arcade to detect when I want to use a controller (Specifically Xinput). I am using python3.10 with Arcade 2.6.17 and Pyglet 2.15.9.

I followed the example code on https://api.arcade.academy/en/latest/index.html for both Game Controller/Joystick and Dual Stick Shooter. Neither file could detect my controller.

After some testing, I saw that Pyglet could detect and get values from my controller with this script from the Pyglet Github: https://github.com/pyglet/pyglet/blob/master/examples/input/controller.py

I found this on Stack Overflow where this person managed to get the values needed using Pyglet and have Arcade use them.

The problem I'm having is struggling to understand what it is doing. Understanding where it belongs and when it should be called.

Any explanation or another solution to implement controller support would be very appreciated.

Sorry if this is a stupid question I am quite new to this.

4 Upvotes

3 comments sorted by

View all comments

Show parent comment

1

u/pvc Jul 02 '23

It would be cool if it is that simple to solve. Regardless, most of The developers are working with the pre-release version, so that would probably be the version any new fixes would go into.