A python program to compute the safest path between two locations in apex legends
It uses a custom varient of graph path finding that focuses on speed of computing the path, and actual distance from start to finish instead of node count.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Step 1: Clone the repo
git clone https://github.com/happihound/apex-rotation-advice.git
Step 2: Navigate to the project directory
cd apex-rotation-advice
Step 3: Install dependencies
pip install -r requirements.txt
Step 4: Run the project
python main.py
This utility accepts the following command line arguments:
To see all valid command line arguments:
main.py -h
To start the association viewer utlity:
main.py association -mapName= -mode=
To start the safe path viewer utility:
main.py findSafePath -mapName= -ratio=
In order to to use the utility, you must first scan a beacon in game.
- While the map still shows all the location of all enemies, take a screenshot
- Place the screenshot in the inputScan folder.
- Run the program with the mapName argument set to the name of the map you are playing on.
- If you are using the safe path viewer, you should also provide the ratio argument.
The program will then attempt to find the location of all enemies, and the safest path between all selected poi's while avoiding all enemies.
Note: The ratio argument is the ratio of the screenshot placed in the inputScan folder.
If no ratio is given, the program will attempt to find the ratio, this is not always accurate, so it is recommended to provide the ratio.
Viewing all association data for World's Edge:
python main.py association -mapName=WE -mode=all
Finding a safe path between two poi's on worlds edge from the 16:10 aspect ratio screenshot:
python main.py findSafePath -mapName=WE -ratio=16:10
Running the above command will open this window in which you can select the poi's you want to find a safe path between.
The number of pois you can select is not limited, and they will be connected in the order you select them
Example of Lava and Skyhook selected:
Example result of the safe path between the two poi's
If you'd like to run the tests, you can do so by running the following command:
python run_tests.py
1. Convert the image to convert to 1:1 aspect ratio and then to 800x800 pixels - Done
2. Take the input image and do threshholding on it to highlight enemy markers- Done
3. If the markers are close enough, group them together and find the center of the group - Done
4. Draw a minimum convex hull around the center of the group - Done
5. Find the center of the hull - Done
6. Create a node based graph of the map - Done
7. Plot safest path between two points - Done
8. Publish the project to github - Done
9. Add more maps - To be done
10. Add the ability to predict ring movement - To be done
Have an idea? Feel free to open an issue or pull request and I'll look into it!
This project is not to be used for commercial purposes or any other purpose other than personal use. Credit must be given to the original author of this project if it is used in any other project. It may not be used in any project that is not open source.
- Thanks to wattson_x for assisting with the labeling of the map, without his help this project would not have been possible.
- Thanks to the Apex Legends community for providing the data used in this project.
- Thanks to KeanuJ for the inspiration for this project.