GithubHelp home page GithubHelp logo

gt7-race-automation's Introduction

GT7 Race Automation

The main.py script allows you to automate racing circular tracks using PyAutoGUI and PS Remote Play. Depending on the car and track you race, you can make 400K/hr or more. NOTE: The track must have unidirectional turns, meaning every turn should be either left or right. I think the script should work on any platform.

Instructions

All you need to do is open PS Remote Play and then navigate to the race start screen for the track you want to automate. This is the screen with Start, Settings, and Exit buttons. Make sure that the remote play window is in the middle of your primary monitor because the script clicks the center of the screen to get the winow's focus.

Next, open a terminal with administrator privileges (I had to use administrator privileges, but you might not have to). Navigate to the directory containing this script and run it:

py main.py

Voila! You are now racing in circles.

By default this will race around a circular track with left turns for 200 seconds before navigating through the menus to restart the race. You can change the behavior by passing some command line arguments.

  • To change the side of the track you hug, you can pass the flag --direction=DIRECTION. By default you hug the right rail. You can also simply pass -left or -l or -right or -r.
  • You can change the duration with --duration=DURATION, where DURATION is the number of seconds that the race takes. You can also simply pass a number, like 200. To get a sense for how long the race takes, start the script with a long duration, say 1000 seconds, and see how long it takes to navigate the course and then restart the script using the new duration (you should add some padding to account for collisions, maybe +10 seconds to be safe).

The following command will automate a 120 second race where you hug the left hand rail of the course:

py main.py --direction=left --duration=120

Another command that does the same thing:

py main.py -left 120

Controller settings

It is necessary to map acceleration as well as left and right steering to the d-pad.

In-game settings

  • enable traction control
  • decrease opponents strength in the top-left menu 'options' (will not affect prize money)

Notes

Right now the script simply navigates through the menus for standard races and runs a race based on timing, meaning if you spin out or something the timing will likely be off.

If you want to automate a different event, say a championship series, you can edit the script with new menu navigation commands. These are self explanatory in the script.

gt7-race-automation's People

Contributors

ilillii avatar luvbuzz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.