Commit 9b0ebcf
authored
Interface Revamp, Upgrade Mouse Integration & Performance Enhancements (#46)
# PR #46: Interface Revamp, Humanized Mouse & Performance Overhaul
This is a massive update that updates almost every part of the bot. I wanted to make the client look better, feel more human, and run a lot smoother.
### Complete Web Interface Rehaul
The frontend has been completely rebuilt with a modern **GlassMorphism** aesthetic. Theres also several components in the tech stack which have been created to utilise `WebSockets` for real time updates.
* **Live Debug Viewport:** You can now see exactly what the bot "sees" in real-time. The `ColourContours` and `TemplateMatching` logic push their state directly to the browser. If the stream gets overloaded, the system discards old frames to keep the bot logic running.
* **Reactive Status:** The header now displays the live sensor state (`SEARCHING`, `ACTING`, `WAITING`, `ERROR`) so you know exactly what the bot is thinking.
* **Live Statistics:** Runtime, cycles, and inputs are streamed live.
* **Smart Logs:** Console logs are now colour-coded by severity in the web UI.
* **Better Controls:** Fixed the sliders (you can no longer break them by pushing min past max), and added a **Copy Button** to the colour picker. You can now generate the Java code for a `ColourObj` and paste it directly into your script.
* **Slider performance** Slider performance has been greatly improved by no longer writing modified.png to disk.
### WindMouse Integration
I’ve completely replaced the old `MousePathing` with **WindMouse**.
- Instead of calculating a geometric path, WindMouse simulates a physical cursor with mass. It uses `gravity` to pull towards the target and `wind` to apply randomness making it pixel imperfect.
- Movement includes natural overshoots, micro-jitters, and variable speeds, As a result, overshoot and undershoot methods are now deprecated and removed.
### Performance & Multithreading
We've moved to a **Producer -> Consumer threading model** for inputs. The physics engine calculates mouse movement on one thread, while a separate background thread handles the hardware remote inputs. If the hardware input lag spikes, the physics calculation remains accurate.
**OpenCV Improvements:**
* **Font Caching:** OCR no longer lazy loads on each OCR call, it's cached in memory at startup.
* **Viewport:** The state tracker uses a no-op interface by default and is only hooked up when Spring loads, preventing memory leaks during headless runs.
### Background Mode
This is probably the biggest Quality of Life improvement **You can now hide the RuneLite.**
I replaced the standard Java `Robot` capture with native Windows calls. This reads the window's device context directly and writes it into a buffer.
The bot can see and use the game window even if it is covered by another window. You can finally use your laptop for other things while the bot runs in the background!
> You can't minimise it, however you can maximise other things and cover it completely.
### New Actions Utility
You can now call `ItemDropper.dropAll(controller());` to drop all the items in your inventory.
There are also different dropping patterns to choose from, see the class.
## BREAKING CHANGES:
- `VirtualMouseUtils.moveToPause()` & `VirtualMouseUtils.moveToAndOvershoot()` have been removed.
- There is no longer a "fastest" option in mouse.moveTo().1 parent 9e6c01c commit 9b0ebcf
File tree
117 files changed
+3228
-8533
lines changed- config/checkstyle
- src/main
- java/com/chromascape
- base
- controller
- scripts
- utils
- actions
- core
- input
- keyboard
- mouse
- screen
- topology
- viewport
- window
- state
- statistics
- domain
- ocr
- zones
- web
- config
- image
- instance
- logs
- slider
- state
- stats
- viewport
- resources
- static
- css
- js
- templates
- third_party
- KInput
- KInput/KInput
- minhook
- build
- MinGW
- VC10
- VC11
- VC12
- VC14
- VC15
- VC16
- VC17
- VC9
- cmake
- dll_resources
- include
- src
- hde
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
117 files changed
+3228
-8533
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
| 48 | + | |
| 49 | + | |
51 | 50 | | |
52 | 51 | | |
53 | | - | |
| 52 | + | |
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
57 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
58 | 64 | | |
59 | 65 | | |
60 | 66 | | |
61 | 67 | | |
62 | 68 | | |
63 | 69 | | |
64 | | - | |
| 70 | + | |
65 | 71 | | |
66 | | - | |
| 72 | + | |
67 | 73 | | |
68 | 74 | | |
69 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
File mode changed.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| |||
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
| 48 | + | |
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
| 52 | + | |
48 | 53 | | |
49 | 54 | | |
50 | 55 | | |
| |||
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
| 63 | + | |
58 | 64 | | |
59 | 65 | | |
60 | 66 | | |
| |||
95 | 101 | | |
96 | 102 | | |
97 | 103 | | |
98 | | - | |
| 104 | + | |
| 105 | + | |
99 | 106 | | |
100 | 107 | | |
101 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
52 | 64 | | |
53 | 65 | | |
54 | 66 | | |
55 | 67 | | |
| 68 | + | |
56 | 69 | | |
57 | 70 | | |
58 | 71 | | |
| 72 | + | |
59 | 73 | | |
60 | 74 | | |
| 75 | + | |
| 76 | + | |
61 | 77 | | |
62 | 78 | | |
63 | 79 | | |
64 | 80 | | |
65 | 81 | | |
| 82 | + | |
66 | 83 | | |
67 | 84 | | |
68 | 85 | | |
| |||
74 | 91 | | |
75 | 92 | | |
76 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
77 | 97 | | |
78 | 98 | | |
79 | 99 | | |
80 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
81 | 134 | | |
82 | 135 | | |
83 | 136 | | |
| |||
Lines changed: 2 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | | - | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | 93 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| 46 | + | |
| 47 | + | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
| |||
0 commit comments