Skip to content

notnatedavis/PewPy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PewPy

A high-performance, low-latency aimbot application written in Python 3.13, leveraging modern multiprocessing and multithreading for optimal performance. Features real-time screen capture, GPU-accelerated target detection, and adaptive resource management.

Table of Contents

Introduction

PewPy is a sophisticated aimbot application built with Python 3.13, designed for maximum performance through advanced concurrency patterns and GPU acceleration. The application uses DirectX screen capture, OpenCV-based target detection, and low-latency input control to provide precise aiming assistance.

Order of Operations :

  1. Initialization :
  • Load configuration from YAML files
  • Initialize DirectX screen capture
  • Set up GPU-accelerated target detection
  • Start safety monitoring and hotkey handlers
  • Launch performance overlay
  1. Main Loop :
  • Monitor safety state and hotkeys
  • Capture screen frames at high FPS
  • Process frames for target detection
  • Calculate smooth mouse movements
  • Update real-time performance statistics
  • Apply adaptive resource optimization

Features

  • High-Performance Screen Capture: DirectX desktop duplication API for minimal latency
  • GPU-Accelerated Detection: OpenCV with CUDA support for real-time target detection
  • Adaptive Resource Management: Dynamic CPU/GPU utilization based on system load
  • Real-time Overlay: Tkinter-based overlay with performance metrics and controls
  • Safety First: Emergency stop hotkeys and comprehensive safety monitoring
  • Configuration Hot-Reload: Live configuration updates without restart
  • Python 3.13 Optimized: Leverages new multiprocessing and GIL improvements

Prerequisites

Asahi Linux (Fedora)

  • ...update

Windows

  • Windows 10/11 (64-bit)
  • Python 3.13=+
  • NVIDIA GPU with CUDA support (optional, for GPU acceleration)
  • DirectX 11 compatible graphics card

MacOS

  • ...update

Installation

  1. clone the repo & cd in
  2. run setup script python setup.py

Usage

  1. launch with python src/main.py
  2. Control with Hotkeys :
  • F2 : Toggle on/off
  • F10 : Emergency stop
  • F12 : Graceful Exit
  • Ctrl + Alt + O : Toggle overlay visibility
  • Ctrl + Alt + P : Cycle performance modes
  1. Moniter Performance with overlay

Configuration

  • config/default.yaml: Main application settings
  • config/performance.yaml: Performance and optimization settings

Project-Structure

PewPy/

  • config/
    • default.yaml
    • performance.yaml
  • src/
    • core/
      • __init__.py
      • frame_pipeline.py
      • performance_moniter.py
      • resource_manager.py
      • task_dispatcher.py
    • ui/
      • __init__.py
      • config_manager.py
      • hotkey_handler.py
      • overlay.py
    • utils/
      • __init__.py
      • profiling.py
      • serialization.py
      • shared_memory.py
    • workers/
      • __init__.py
      • input_controller.py
      • safety_moniter.py
      • screen_capturer.py
      • target_detector.py
    • main.py
  • .gitignore
  • ReadMe.md
  • requirements.txt

Additional-Info

This portion is for logging or storing notes relevent to the project and its scope.

Current Focus (delete as I go)

Performance Optimizations

  1. Capture Pipeline
  • ROI cropping during texture mapping (avoid full-screen conversion)
  • Direct BGRA→HSV conversion (eliminate intermediate BGR step)
  • DXGI desktop duplication with partial framebuffer updates
  1. Detection System
  • Dynamic downscaling (adjust based on FPS: 0.5x → 0.8x)
  • CUDA-accelerated contour detection (cv::cuda::findContours)
  • Background subtraction for moving targets
  • Temporal coherence (reuse previous frame's mask)
  1. Input Pipeline
  • Replace Sleep() with high-precision timers (std::chrono)
  • Mouse movement prediction (linear extrapolation)
  • Configurable smoothing curves (easing functions)

Core Features

  1. Dynamic Targeting
  • Kalman filtering for target trajectory prediction
  • Multi-contour analysis (closest to crosshair, largest area)
  • HSV range auto-calibration (F3 to sample target area)
  1. Adaptive ROI
  • ROI centering around last detection
  • Dynamic sizing based on target velocity
  • Manual ROI adjustment via config
  1. Input Modes
  • Raw input API support (for protected games)
  • Absolute/relative mouse mode toggle
  • Humanizer module (randomized movement curves) ?

Configuration & Usability

  1. Config System
  • INI/JSON configuration (color ranges, ROI, hotkeys, smoothing)
  • Runtime reloading (F5 to refresh config)
  • CLI argument parsing
  1. Diagnostic UI
  • DirectX overlay (ROI boundaries, target lock indicator)
  • Performance metrics (FPS, processing time)
  • Detection preview window (debug mode)
  1. Calibration Tools
  • HSV range tester with sliders
  • ROI visual positioning tool
  • Mouse sensitivity profiler

Code Quality & Maintenance

  1. Platform Abstraction
  • Interface classes for input/capture (enable Linux/Wine support)
  • CMake options for CUDA/DirectX
  • Error code standardization
  1. Build System
  • Fix target names (cAimbot vs AimTrainer)
  • OpenCV CUDA conditional compilation
  • CI/CD pipeline (GitHub Actions)
  1. Testing
  • Unit tests for coordinate transformations
  • Capture simulation framework
  • Performance benchmarking suite

Anti-Cheat Mitigations

  1. Obfuscation
  • Randomize window titles/class names
  • DirectX hook masking
  • Mouse event spoofing (hardware IDs)
  1. Behavioral
  • Variable activation delays
  • "Human" jitter simulation
  • Process hollowing techniques

Roadmap

Phase 1 (Stability): Resource leaks, thread safety, config system
Phase 2 (Performance): CUDA optimization, pipeline refactoring
Phase 3 (Features): Prediction algorithms, diagnostic UI
Phase 4 (Stealth): Anti-cheat evasions, driver-level input

About

an aimbot python project utilizing the new

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages