wechat_jump_game README

The project's README from github.com/wangshub/wechat_jump_game. As one markdown file: README.md.

教你用 Python 来玩微信跳一跳

GitHub stars GitHub forks GitHub license

Throughput Graph

游戏模式

2017 年 12 月 28 日下午,微信发布了 6.6.1 版本,加入了「小游戏」功能,并提供了官方 DEMO「跳一跳」。这是一个 2.5D 插画风格的益智游戏,玩家可以通过按压屏幕时间的长短来控制这个「小人」跳跃的距离。分数越高,那么在好友排行榜更加靠前。通过 Python 脚本自动运行,让你轻松霸榜。

可能刚开始上手的时候,因为时间距离之间的关系把握不恰当,只能跳出几个就掉到了台子下面。如果能利用图像识别精确测量出起始和目标点之间测距离,就可以估计按压的时间来精确跳跃。

原理说明

由于微信检测非常严厉,这里的防禁代码可能已经不起作用,主要供学习用途
  1. 将手机点击到《跳一跳》小程序界面

  2. 用 ADB 工具获取当前手机截图,并用 ADB 将截图 pull 上来

adb shell screencap -p /sdcard/autojump.png
adb pull /sdcard/autojump.png .
  1. 计算按压时间
  1. 用 ADB 工具点击屏幕蓄力一跳
adb shell input swipe x y x y time(ms)

使用教程

相关软件工具安装和使用步骤请参考 Android 和 iOS 操作步骤

获取源码

- git clone https://github.com/wangshub/wechat_jump_game.git
非常推荐使用Python3,避免编码及import问题

PR 要求

请选择 merge 进 master 分支,并且标题写上简短描述,例子

[优化] 使用PEP8优化代码

版本说明

FAQ

更新日志

开发者列表

交流

wechat_jump_game (wangshub/wechat_jump_game)

Searching Database…

What is this?A Python script that plays WeChat's mini-game 'Jump Jump' (跳一跳) automatically, using image recognition to measure jump distance and ADB to control the phone screen.
Is this an app or just a script?It's a standalone Python script you run on your computer; it's not installed on the phone itself, it controls the phone externally via ADB.
How do I get it running?Clone the repo, make sure the phone has 'Jump Jump' open, then run the script which pulls a screenshot via ADB, analyzes it, and triggers a timed screen press to jump.
Do I need ADB set up first?Yes, you need Android Debug Bridge (ADB) installed and configured to connect to your phone, plus Python 3 to avoid encoding/import issues.
Does the anti-ban code still work?The author warns that WeChat's detection is strict and the anti-ban tricks in the code may no longer be effective, so it's mainly for learning purposes now.
Does it support both manual and automatic jump calculation?Yes: a manual mode where you click the start and target points on a Matplotlib-displayed screenshot to measure distance, and an automatic mode that detects the piece and board by color.
Does this work with iOS devices too?The README mentions setup steps for both Android and iOS, though the core screenshot/control mechanism described relies on ADB, which is an Android tool.
How does the script decide how long to press the screen?It computes the pixel distance between the character's current position and the target platform, then converts that distance into a proportional press duration to trigger the jump via ADB.
Why isn't there a one-click installer?It's a hobby/learning script built around ADB automation, so setup just means cloning the repo, connecting a phone via ADB, and running the Python file directly.
Creator
wangshub
Size
26.3 MB
Stars
13.8K
Updated
CommitAug 03
Age
8y
Commits · 90 Days