Skip to content

andrestubbe/FastGhostMouse

Repository files navigation

FastGhostMouse v0.1.0 [ALPHA] — High-Performance Native Overlay Cursor for Java

Status License: MIT Java Platform JitPack


âš¡ A lightweight, click-through native overlay module for the FastJava ecosystem. Visualize cursor paths and AI predictions with zero latency.

FastGhostMouse provides a high-performance, transparent native overlay for visual feedback. Built for bot visualization, UI debugging, and AI-driven cursor path prediction.

Watch the Demo

FastKeyboard Showcase


Table of Contents


Why FastGhostMouse?

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:

  • The Focus Stealing Problem: Standard undecorated JFrame overlays often steal window focus from the target application, immediately breaking the bot's interactions.
  • 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.
  • 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.

FastGhostMouse bypasses these limitations by hooking directly into the Windows OS rendering pipeline:

  • 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.
  • Zero-Focus Disruption (WS_EX_NOACTIVATE): The overlay is guaranteed to never steal focus from your active game or application.
  • Featherweight Footprint: Optimized to draw simple geometry (like an AI cursor trail or prediction nodes) with near-zero latency and negligible CPU cost.

Quick Start

import fastghostmouse.FastGhostMouse;

public class Example {
    public static void main(String[] args) throws Exception {
        FastGhostMouse ghost = new FastGhostMouse();
        
        // 1. Initialize and spawn the click-through cursor at screen center
        ghost.useAsSecondaryMouse(960, 540, 0);
        
        // 2. Smoothly animate the cursor to a new location
        // The internal engine calculates the delta time and interpolates the movement
        ghost.moveTo(1500, 200);
        
        Thread.sleep(1000);
        
        // 3. Move again with a customized smoothing factor
        ghost.setSmoothing(0.05f); // Slower, heavier movement
        ghost.moveTo(100, 800);
    }
}

Features

  • 🖱ï¸� Ghost Cursor: Hardware-accelerated, click-through overlay cursor.
  • ✨ Smooth Paths: Native DirectX rendering for flicker-free path visualization.
  • 📦 Zero Latency: Bypasses the Java Swing/AWT event thread.
  • 🚀 Click-Through: Completely focus-agnostic native window.

Installation

Option 1: Maven (Recommended)

Add the JitPack repository and the dependencies to your pom.xml:

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependencies>
   <dependency>
       <groupId>com.github.andrestubbe</groupId>
       <artifactId>fastghostmouse</artifactId>
       <version>v0.1.0</version>
   </dependency>
   <dependency>
       <groupId>com.github.andrestubbe</groupId>
       <artifactId>fastcore</artifactId>
       <version>v0.1.0</version>
   </dependency>
</dependencies>

Option 2: Gradle (via JitPack)

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'com.github.andrestubbe:fastghostmouse:v0.1.0'
    implementation 'com.github.andrestubbe:fastcore:v0.1.0'
}

Option 3: Direct Download (No Build Tool)

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

  1. 📦 fastghostmouse-v0.1.0.jar (The Core Library)
  2. 📦 fastcore-v0.1.0.jar (The Mandatory Native JNI Loader)

Documentation

  • COMPILE.md: Full compilation guide (Maven Build Setup).
  • REFERENCE.md: Exhaustive catalog of timeline strategies and engine architecture.
  • PHILOSOPHIE.md: Zero-allocation and low-overhead processing designs.
  • ROADMAP.md: Planned milestone features and performance extensions.

Platform Support

Platform Status
Windows 10/11 ✅ Fully Supported
Linux 🚧 Planned
macOS 🚧 Planned

Documentation

  • COMPILE.md: Full compilation guide (MSVC C++17 build chain + JNI Setup).
  • REFERENCE.md: Exhaustive catalog of native overlay features and click-through mechanics.
  • PHILOSOPHIE.md: Zero-latency rendering and focus-agnostic processing designs.
  • ROADMAP.md: Planned milestone features and performance extensions.

License

MIT License — See LICENSE file for details.


Related Projects

  • FastFileIndex — Ultra-fast filesystem scanner
  • FastTheme — High-performance native window styling
  • FastThumb — Native Shell Image Engine

Part of the FastJava Ecosystem — Making the JVM faster. Small package. Maximum speed. Zero bloat. 🚀📋

About

⚡High-performance native ghost cursor overlay for Java applications with GPU-accelerated DirectComposition rendering. Features smooth 60fps animations, multi-monitor support, and text display in speech bubbles. Ideal for tutorials, demos, and visual feedback systems.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors