Skip to content

Commit f3fd8dc

Browse files
committed
Auto Update
1 parent 1730343 commit f3fd8dc

4 files changed

Lines changed: 96 additions & 41 deletions

File tree

PHILOSOPHIE.md

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,26 @@
1-
# The Philosophy of FastXXX
1+
# The Philosophy of FastGhostMouse
22

33
> [!IMPORTANT]
4-
> **"Keine Kopien. Niemals. Kritischer JNI-Pfad. Native-First Performance."**
4+
> **"Visual Feedback without Interference. Zero Focus Theft. Absolute Click-Through."**
55
6-
FastXXX is built on the principle that modern Java applications require **native-first** acceleration for performance-critical operations that the standard JVM APIs don't fully optimize.
6+
FastGhostMouse is built on the principle that automation bots, AI models, and testing frameworks desperately need visual debugging, but traditional Java UI solutions destroy the very environment they try to automate.
77

88
## Core Tenets
99

10-
1. **Native-First Execution**
11-
Bypass standard Java layers to reach the physical limits of the hardware using hand-tuned C++ and SIMD intrinsics.
10+
1. **Do Not Disturb the Host**
11+
An automation overlay must never steal focus (`WS_EX_NOACTIVATE`) and must never block input (`WS_EX_TRANSPARENT`). If a bot clicks, the click must reach the target app, not the overlay.
1212

13-
2. **Zero-Copy JNI Architecture**
14-
Minimize JNI transition costs by using direct memory access patterns and avoiding implicit memory copies between the JVM and the native layer.
13+
2. **Bypass the AWT/Swing EDT**
14+
Standard Java windows (`JFrame`) are bound to the Event Dispatch Thread. Tying your bot's visual feedback to the heavy AWT pipeline guarantees micro-stutters and input lag. FastGhostMouse hooks directly into native Win32/DWM rendering to bypass Java's UI constraints entirely.
1515

16-
3. **Deterministic Latency**
17-
Eliminate variance caused by JIT warm-up or garbage collection stalls in critical hot-paths.
16+
3. **Visual Truth for AI**
17+
When training or debugging AI agents, seeing the *exact* intended path of the cursor is critical. FastGhostMouse interpolates natively to show smooth trajectories and state changes, giving developers an instant "window into the AI's mind."
1818

19-
4. **Hardware-Aware Optimization**
20-
Leverage modern CPU features (AVX, SSE, NEON) to process data at hardware-native speeds.
21-
22-
5. **Blueprint Consistency**
23-
As part of the **FastJava** ecosystem, FastXXX adheres to a standardized architecture:
24-
* **Native Backend**: Direct C++ implementation.
19+
4. **Blueprint Consistency**
20+
As part of the **FastJava** ecosystem, FastGhostMouse adheres to a standardized architecture:
21+
* **Native Backend**: Direct C++ implementation via `FastOverlay`.
2522
* **Unified Loading**: Powered by `FastCore`.
26-
* **Premium Quality**: Built for high-performance systems and autonomous agents.
23+
* **Premium Quality**: Built specifically for high-performance automation and autonomous agents.
2724

2825
---
29-
**⚡ FastXXX — Powering the next generation of Native Java.**
26+
**❤️ FastGhostMouse — Powering the next generation of Native Java.**

README.md

Lines changed: 66 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@ predictions with zero latency.**
1414
**FastGhostMouse** provides a high-performance, transparent native overlay for visual feedback. Built for bot
1515
visualization, UI debugging, and AI-driven cursor path prediction.
1616

17-
---
17+
[**Watch the Demo**](https://www.youtube.com/watch?v=4C6fNPwXHEs&list=PL-mASGDMkCUqJ0bXAJP28ykqPP9RqMMsA&index=19)
1818

19-
[![FastKeyboard Showcase](docs/screenshot.png)](https://www.youtube.com/watch?v=cTas4WZ-Qc4)
19+
[![FastKeyboard Showcase](docs/screenshot.png)](https://www.youtube.com/watch?v=4C6fNPwXHEs&list=PL-mASGDMkCUqJ0bXAJP28ykqPP9RqMMsA&index=19)
2020

2121
---
2222
## Table of Contents
2323

24+
- [Why FastGhostMouse?](#why-fastghostmouse)
2425
- [Quick Start](#quick-start)
2526
- [Features](#features)
2627
- [Quick Start](#quick-start)
@@ -29,14 +30,43 @@ visualization, UI debugging, and AI-driven cursor path prediction.
2930

3031
---
3132

33+
## Why FastGhostMouse?
34+
35+
When building automation bots, AI models, or testing frameworks, visualizing what the software is actually doing is one of the hardest challenges. Standard Java solutions for drawing on the screen suffer from severe limitations:
36+
37+
- **The Focus Stealing Problem**: Standard undecorated `JFrame` overlays often steal window focus from the target application, immediately breaking the bot's interactions.
38+
- **Heavy Rendering Pipelines**: Relying on full-blown UI frameworks to draw a simple cursor trail consumes massive CPU/GPU resources, degrading the performance of the game or app you are trying to automate.
39+
- **Input Blocking**: Most overlay solutions accidentally intercept mouse clicks or keyboard events, preventing the user (or the bot) from interacting with the UI beneath the overlay.
40+
41+
**FastGhostMouse** bypasses these limitations by hooking directly into the Windows OS rendering pipeline:
42+
43+
- **True Click-Through (`WS_EX_TRANSPARENT`)**: Built on native JNI bindings, the overlay is mathematically invisible to mouse and keyboard events. You can click right through it.
44+
- **Zero-Focus Disruption (`WS_EX_NOACTIVATE`)**: The overlay is guaranteed to never steal focus from your active game or application.
45+
- **Featherweight Footprint**: Optimized to draw simple geometry (like an AI cursor trail or prediction nodes) with near-zero latency and negligible CPU cost.
46+
47+
---
48+
3249
## Quick Start
3350

3451
```java
3552
import fastghostmouse.FastGhostMouse;
3653

3754
public class Example {
38-
public static void main(String[] args) {
39-
// TODO
55+
public static void main(String[] args) throws Exception {
56+
FastGhostMouse ghost = new FastGhostMouse();
57+
58+
// 1. Initialize and spawn the click-through cursor at screen center
59+
ghost.useAsSecondaryMouse(960, 540, 0);
60+
61+
// 2. Smoothly animate the cursor to a new location
62+
// The internal engine calculates the delta time and interpolates the movement
63+
ghost.moveTo(1500, 200);
64+
65+
Thread.sleep(1000);
66+
67+
// 3. Move again with a customized smoothing factor
68+
ghost.setSmoothing(0.05f); // Slower, heavier movement
69+
ghost.moveTo(100, 800);
4070
}
4171
}
4272
```
@@ -66,6 +96,7 @@ Add the JitPack repository and the dependencies to your `pom.xml`:
6696
<url>https://jitpack.io</url>
6797
</repository>
6898
</repositories>
99+
69100
<dependencies>
70101
<dependency>
71102
<groupId>com.github.andrestubbe</groupId>
@@ -86,6 +117,7 @@ Add the JitPack repository and the dependencies to your `pom.xml`:
86117
repositories {
87118
maven { url 'https://jitpack.io' }
88119
}
120+
89121
dependencies {
90122
implementation 'com.github.andrestubbe:fastghostmouse:v0.1.0'
91123
implementation 'com.github.andrestubbe:fastcore:v0.1.0'
@@ -96,11 +128,36 @@ dependencies {
96128

97129
Download the latest JARs directly to add them to your classpath:
98130

99-
1. 📦 *
100-
*[fastghostmouse-v0.1.0.jar](https://github.com/andrestubbe/FastGhostMouse/releases/download/v0.1.0/fastghostmouse-v0.1.0.jar)
101-
** (The Core Library)
102-
2. ⚙️ **[fastcore-v0.1.0.jar](https://github.com/andrestubbe/FastCore/releases/download/v0.1.0/fastcore-v0.1.0.jar)** (
103-
The Mandatory Native Loader)
131+
1. 📦 **[fastghostmouse-v0.1.0.jar](https://github.com/andrestubbe/FastGhostMouse/releases/download/v0.1.0/fastghostmouse-v0.1.0.jar)** (The Core Library)
132+
2. 📦 **[fastcore-v0.1.0.jar](https://github.com/andrestubbe/FastCore/releases/download/v0.1.0/fastcore-v0.1.0.jar)** (The Mandatory Native JNI Loader)
133+
134+
---
135+
136+
## Documentation
137+
138+
* **[COMPILE.md](COMPILE.md)**: Full compilation guide (Maven Build Setup).
139+
* **[REFERENCE.md](REFERENCE.md)**: Exhaustive catalog of timeline strategies and engine architecture.
140+
* **[PHILOSOPHIE.md](PHILOSOPHIE.md)**: Zero-allocation and low-overhead processing designs.
141+
* **[ROADMAP.md](ROADMAP.md)**: Planned milestone features and performance extensions.
142+
143+
---
144+
145+
## Platform Support
146+
147+
| Platform | Status |
148+
|---------------|-------------------|
149+
| Windows 10/11 | ✅ Fully Supported |
150+
| Linux | 🚧 Planned |
151+
| macOS | 🚧 Planned |
152+
153+
---
154+
155+
## Documentation
156+
157+
* **[COMPILE.md](COMPILE.md)**: Full compilation guide (MSVC C++17 build chain + JNI Setup).
158+
* **[REFERENCE.md](REFERENCE.md)**: Exhaustive catalog of native overlay features and click-through mechanics.
159+
* **[PHILOSOPHIE.md](PHILOSOPHIE.md)**: Zero-latency rendering and focus-agnostic processing designs.
160+
* **[ROADMAP.md](ROADMAP.md)**: Planned milestone features and performance extensions.
104161

105162
---
106163

REFERENCE.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
# FastGhostMouse Reference
22

3-
## 1. CPU Feature Model
4-
* **AVX2** — detected via CPUID. Enables 32-byte vector ops.
5-
* **SSE4.2** — detected via CPUID. 16-byte fallback.
6-
* **Fallback rule**: AVX2 → SSE4.2 → scalar.
3+
## 1. Native Overlay Engine
4+
* **WS_EX_TRANSPARENT**: The overlay window is mathematically ignored by the Windows input subsystem. Mouse clicks and keyboard events pass directly through to the underlying application.
5+
* **WS_EX_NOACTIVATE**: The overlay will never steal window focus from your active game, application, or browser, ensuring automation bots are not interrupted.
6+
* **WS_EX_LAYERED**: Enables per-pixel alpha transparency and high-performance image blending via standard Windows APIs.
77

8-
## 2. Guarantees
9-
* **Zero-Copy**: All operations use `GetPrimitiveArrayCritical` for direct memory access.
10-
* **Unaligned Access**: Safe on all byte boundaries.
11-
* **Thread-Safety**: All static native methods are thread-safe.
8+
## 2. API Capabilities
9+
* **useAsSecondaryMouse(x, y, index)**: Captures the active Windows cursor and seamlessly integrates it into a secondary, scriptable hardware cursor.
10+
* **moveTo(x, y)**: Initiates a hardware-accelerated, interpolated movement to the target coordinates.
11+
* **setSmoothing(factor)**: Adjusts the momentum and easing of the cursor. Lower values produce heavier, more human-like drag, while higher values snap instantly.
12+
* **setTextImage**: Attaches dynamic visual text or labels directly beneath the cursor (e.g., "Executing AI Action").
1213

13-
## 3. JNI & Memory Contracts
14-
* **Direct Memory Pinning**: No implicit copies are made by the JNI bridge.
15-
* **No Allocation**: All operations work on pre-allocated Java arrays or buffers.
16-
* **Critical Sections**: Native calls minimize blocking to prevent GC impact.
14+
## 3. FastCore & FastOverlay Bindings
15+
* **JNI Hooks**: `FastGhostMouse` relies on the unified `FastCore` JNI loader to access `FastOverlayWindow` instances.
16+
* **Zero Swing/AWT Logic**: The overlay bypasses the Java Event Dispatch Thread (EDT) completely, preventing UI locks or stutters during complex bot logic.
1717

1818
## 4. Platform Support
1919
| Platform | Status |
2020
|----------|--------|
2121
| Windows 10/11 (x64) | ✅ Fully Supported |
22+
| Linux | 🚧 Planned (X11/Wayland hooks) |
23+
| macOS | 🚧 Planned |
2224

2325
---
24-
**Part of the FastJava Ecosystem***Making the JVM faster.*
25-
26-
Made with ⚡ by Andre Stubbe
26+
**Part of the FastJava Ecosystem***Making the JVM faster. Small package. Maximum speed. Zero bloat. 🚀📋*

examples/Demo/src/main/java/fastghostmouse/demo/Demo.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ else if (ey < TITLEBAR_HEIGHT) {
111111
FastTheme.setTitleBarDarkMode(hwnd, true);
112112
FastTheme.setTitleBarColor(hwnd, 0, 0, 0);
113113
FastTheme.setTitleBarTextColor(hwnd, 255, 255, 255);
114+
FastTheme.setWindowTransparency(hwnd, 224);
114115

115116
frame.setVisible(true);
116117

0 commit comments

Comments
 (0)