Code Monkey home page Code Monkey logo

minecraft-aimbot's Introduction

Aimbot destroying Wynncraft / Minecraft server's target practice challenge. Cleared 500/500 waves.

Demo vid:

2024.mp4

Context:

Each wave, player has to shoot down all target bottle(s) within short amount of time

Image processing

  • Screenshot frame

  • Filter using bottle outline - just shades of black

    • Using lower and upper bound mask only results in too much noise. Compared each rgb channel because something like [40, 38, 39] is more convincingly black than [0, 10, 0]. The former is just a lighter shade of black while the latter is basically very dark green
    • Filter max grayscale value <= around 40
  • Find contours by connected pixels

  • Bound rectangles with a minimum size requirement to get positions of bottles

  • Briefly tried basic morphological transformations, wasn't effective but could work

Movement algorithm

  • Main problem with shooting:

    • Shooting target takes time before target disappears, ~0.5-0.8 seconds + some inconsistent server lag, so double shooting needs to be prevented
  • Movement details:

    • Number of pixels on screen = number of mouse pixels moved * some constant factor - so can move and shoot once position determined
    • Mouse movements are 100% accurate with 0.1s delay for the game to process mouse inputs
  • Movement algo:

    • Return to center if there is nothing or nothing that hasn't already been shot at to get a full view of all possible target locations
    • Time-based memory to determine which targets to shoot at
      • Track all positions that were shot at up to 1 second ago through storing cumulative mouse movements
      • If tracked position and actual observed position of target is within distance threshold, the algo will know that the target has been shot at before and skip shooting at it
    • Shoot all shootable bottles in screenshot

Settings

  • Disable "Enhance pointer precision" setting to remove 'leftover' movements
  • FOV normal
  • GUI smallest to remove interfering elements

Struggles

  • When testing mouse movement accuracy, I misinterpeted that mouse movements were inaccurate but they were actually due to other issues. This led to a lot of pointless movement calibration fixes that wasted time.
  • Image processing technique was originally not as good. Since garbage in, garbage out, this led to many ineffective calibration attempts.

minecraft-aimbot's People

Contributors

fatkidddd avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.