2

I am trying to control a game by using python. The specific game I am trying to control is F1 2019 (DirectX 12 version). I have been successful in controlling the game with keyboard inputs using ctypes, however I was wondering if there was any way to get a controller type output.

In the long run, I want to eventually be able to train a model that will be able to drive through one of the tracks. Currently, with the way the keyboard inputs work, the car will either be at full throttle, or breaking all the way. Likewise, it does not gradually increase steering. By nature, it has to press the key down and release it and repeat that until it gets through a corner. A controller input to the game however, would allow for gradual increments of the previous actions instead of an "on off switch". Is there a way to send "controller" inputs to the game?

I'm sure I left some details out, so feel free to ask questions. I am following the sentdex GTA V Python Plays videos to act as a guide.

Jack
  • 21
  • 1

0 Answers0