Demo: https://youtu.be/k5QqXoVuOv8
A fairly simple autopilot for a game. It uses OpenCV to recognize various GUI elements and a very simple control algorithm to press keyboard buttons.
Unreleased changes include a kalman filter and a linear-quadratic-regulator driving the mouse for smooth and accurate control.
- click Releases, above,
- download the archive (it's about 8 MB because of the opencv dll)
- modify the key bindings in EDAP.exe.config (or change your in-game bindings to match)
- set your game settings as required (see next section)
- run EDAP.exe
- Install Visual Studio Community
- Clone this repository
- Open EDAP.sln
- Press F5 to compile and run
- Key bindings. Edit EDAP.exe.config with your key bindings. A list of recognized keys is in Keyboard.cs and in the readme included with releases.
- Resolution is hardcoded to 1920x1080 (changing this is gonna mean changing lots of numbers and template images)
- Executable is hardcoded as the 64-bit version
- The colours looked for are (if you've changed your HUD colours, these things won't work):
- Compass calibration: red channel
- Compass dot: blue channel
- Triquadrant target: bright yellow/orange (I don't think you can change this)
- Saf Diseng: blue channel
- Disable GUI effects (the animation when you open a side panel, speeds up panel opening)
- Interface brightness should be set to three pips below max (I don't know how much this matters though, there is some leeway in the detectors)
- Mouse Widget (the little 5x5px solid yellow square in the middle of the screen) should be enabled as otherwise the fine alignment won't work.
- Just after each faceplant, there's a macro to target the star we just arrived at. This macro works better if you remove "Systems" from the left-hand-side Navigation list using "Set Filter".
- It's better to avoid scooping the hotter stars (there aren't many of them anyway). Set your galmap filter to only show stars of class F, G, K and M (and select the "Apply Filter To Route" option).
See Pilot.cs. tldr:
- press jump, throttle 100%
- wait 30 seconds then throttle 0%
- wait until centre of screen goes bright (star appears -- (1)) or compass stops moving (non-sequence star -- (2))
- 50% throttle, pitch up if IMPACT warning is displayed, wait 20 seconds (scoop)
- select star, use compass to point away from star
- select next destination, use compass to point at it
- go to step 1 until jump counter is 0
- set throttle to 75%, point at target continuously
- if "safe disengage" is displayed, press docking key sequence (disengage, wait, boost, 0% throttle, request docking)
Things that may kill you if you leave this running unattended include:
- interdiction (if you use this in the bubble, keep an eye on it)
- binaries / multiple stars (it will pitch up to avoid collisions while scooping but otherwise takes no evasive measures)
- white dwarfs, black holes, and neutron stars (it won't try to scoop these but may still hit the cones)
- overheating near big stars -- the 20-second scoop wait is not long enough for some stars, it will start charging to jump too early
- bugs / bad code -- i've tested it fairly extensively but it may stil have weird shit
- aliens