GithubHelp home page GithubHelp logo

helicopter_game_cv's Introduction

helicopter_game_cv

A WIP project to automate an old Flash game named Helicopter Game with computer vision.

How does it work?

It takes a screenshot of the game, does computer vision magic with OpenCV, then clicks your mouse to control the helicopter.

Requirements

OS

Windows 10, since the project uses the Windows API to get the screen coordinates and set the window size and Z-order.

Python

Python 3. Also, these requirements, probably:

mss==6.1.0
numpy==1.20.3
opencv-python==4.5.3.56
pyautogui==0.9.53

Other

the code is poor

Running

  1. Install the Python deps, you probably know how to do it better than I
  2. Download the SWF from the Internet Archive: https://archive.org/details/helicoptergame_flash
  3. Download the standalone Flash Player projector from here: https://www.adobe.com/support/flashplayer/debug_downloads.html
  4. Start the Flash player and File -> Open the SWF
  5. Start the program
  6. You'll see a new window pop up. To close the window, activate its window and press q
  7. Move your mouse cursor inside the play area of the Flash player. The program will resize the Flash player window and start sending mouse clicks with your mouse with pyautogui. The safeties are off from the library, so to stop it, just move your cursor outside of the play area. You should be able to move the Flash player window normally by dragging the window title.

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.