On the afternoon of December 28, 2017, wechat released version 6.6.1, which added the “mini game” function and provided the official demo “Jump jump”.

wangshub.github.io

The project address

Game mode

This is a 2.5D illustration-style puzzle game that allows you to control how far the “little man” jumps by pressing the screen for as long as possible. Maybe at the beginning, because the relationship between time and distance is not appropriate, can only jump out of a few fell to the table below. Gameplay similar to Flappy Bird

If you can accurately measure the distance between the starting point and the target point, you can estimate the time of the press to accurately jump, right? So it took two hours to write a Python script to verify

Hope not to brush the score too high, easy to have no friends…

Tool is introduced

  • Python 2.7
  • Android mobile phone
  • The Adb driver
  • Python Matplot drawing

Principle that

  1. Click the phone to jump jump small program interface;
  2. Use THE Adb tool to get a screenshot of the current phone, and use Adb to pull the screenshot up
    adb shell screencap -p /sdcard/1.png
    adb pull /sdcard/1.png .Copy the code
  1. Display screenshots with matplot;
  2. Click the starting point and target position with the mouse to calculate the pixel distance;
  3. According to the pixel distance, calculate the pressing time;
  4. Click on the screen with Adb to jump;
    adb shell input swipe x y x y timeCopy the code

The experimental results

TODO

Can be pulled up the picture color segmentation, identify the SIMS and the target center store, so there is no need to manually click automatic bounce. Robots, it turns out, are better at playing games than people.