Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

好用的参数以及晒分发到这里 #61

Open
binderclip opened this issue Dec 30, 2017 · 97 comments
Open

好用的参数以及晒分发到这里 #61

binderclip opened this issue Dec 30, 2017 · 97 comments
Labels

Comments

@binderclip
Copy link
Collaborator

binderclip commented Dec 30, 2017

欢迎可用的同学把自己的参数贴在这里,这里不接受问题 参数没设置好的发这里 · Issue #62
模板如下

机型:
分辨率(写明宽高):
具体参数:

under_game_score_y = 
press_coefficient = 
piece_base_height_1_2 = 
piece_body_width = 

最高打到了多少分(欢迎截图):

@binderclip binderclip changed the title 好用的参数收集 好用的参数发到这里 Dec 30, 2017
@binderclip binderclip changed the title 好用的参数发到这里 好用的参数以及筛分发到这里 Dec 30, 2017
@VitalyAnkh
Copy link
Contributor

VitalyAnkh commented Dec 30, 2017

我的是小米手机5s Plus,5.7英寸屏幕,1920*1080分辨率,press_coefficient=1.418比较合适

@binderclip binderclip changed the title 好用的参数以及筛分发到这里 好用的参数以及晒分发到这里 Dec 30, 2017
@hiyoi
Copy link
Collaborator

hiyoi commented Dec 30, 2017

锤子M1L,分辨率 2660x1440
under_game_score_y = 390
press_coefficient = 1.04
piece_base_height_1_2 = 26
piece_body_width = 110

目前最高分是878

@binderclip
Copy link
Collaborator Author

binderclip commented Dec 30, 2017

机型:一加3T
分辨率(写明宽高):1920x1080
具体参数:默认参数
最高打到了多少分(欢迎截图):
image
image

@juemeng
Copy link

juemeng commented Dec 30, 2017

1加3T不是1920*1080的吗?

@binderclip
Copy link
Collaborator Author

@juemeng 手抖

@wangjian-k
Copy link

小米6,分辨率 1920x1080
press_coefficient = 1.418
其他参数未修改

ps:自动开始游戏参数修改:swipe_x1,swipe_y1,swipe_x2,swipe_y2 = 560, 1550,560,1550

目前最高分是697

@c588
Copy link

c588 commented Dec 30, 2017

一加3T
1920*1080
ubuntu
默认参数
三千分

@zhuangsen
Copy link

一加5T
1080*2160
win7

第一步都跑不起来

@juemeng
Copy link

juemeng commented Dec 30, 2017

我也是一加3T,8.0公测第五版Room。。默认参数10位数就死了。。

@gunten
Copy link

gunten commented Dec 30, 2017

机型:一加5
分辨率(写明宽高):1920x1080
系数:1.392
216

@F-loat
Copy link
Contributor

F-loat commented Dec 30, 2017

努比亚z17s,分辨率 2040x1080
under_game_score_y = 360 // 只改了这个参数
press_coefficient = 1.392
piece_base_height_1_2 = 25
piece_body_width = 80

最高分正在生成中(准备跑个2333😶),目前很高几率可以落在正中心

@cc-cfg
Copy link

cc-cfg commented Dec 30, 2017

大佬,请问这个参数在代码哪个地方更改?

@mg459046365
Copy link

@a772856947 xxxxx_auto.py文件中

@cc-cfg
Copy link

cc-cfg commented Dec 30, 2017

@mg459046365 具体是贴哪个方法下面

@mg459046365
Copy link

@a772856947 不用贴。# Magic Number,不设置可能无法正常执行,请根据具体截图从上到下按需设置。这句话,下面的几个数字都是可以调的。你根据说明去调节就行了。

@cc-cfg
Copy link

cc-cfg commented Dec 30, 2017

谢谢大佬 @mg459046365

@ww10075
Copy link

ww10075 commented Dec 30, 2017

一加5t,目前可以正常跳跃了
具体参数如下:
under_game_score_y = 500
press_coefficient = 1.392
piece_base_height_1_2 = 25
piece_body_width = 80

@Jing-Luo
Copy link

机型:小米Mix 2
参数

under_game_score_y = 420    
press_coefficient = 1.673   
swipe_x1, swipe_y1, swipe_x2, swipe_y2 = 600, 1800, 600, 1800     
piece_body_width = 85      

代码段

# coding: utf-8
import os
import time
import math
from PIL import Image
import random

# Magic Number,不设置可能无法正常执行,请根据具体截图从上到下按需设置
under_game_score_y = 420     # 截图中刚好低于分数显示区域的 Y 坐标,300 是 1920x1080 的值,2K 屏、全面屏请根据实际情况修改
press_coefficient = 1.673      # 长按的时间系数,请自己根据实际情况调节
swipe_x1, swipe_y1, swipe_x2, swipe_y2 = 600, 1800, 600, 1800     # 模拟按压的起始点坐标,需要自动重复游戏请设置成“再来一局”的坐标
piece_body_width = 85       # 棋子的宽度,比截图中量到的稍微大一点比较安全,可能要调节


def pull_screenshot():
    os.system('adb shell screencap -p /sdcard/1.png')
    os.system('adb pull /sdcard/1.png .')


def backup_screenshot(ts):
    # 为了方便失败的时候 debug
    dir_path = 'screenshot_backups/'
    if not os.path.isdir(dir_path):
        os.mkdir(dir_path)
    os.system('cp 1.png {}{}.png'.format(dir_path, ts))


def jump(distance):
    press_time = distance * press_coefficient
    press_time = max(press_time, 200)   # 设置 200 ms 是最小的按压时间
    press_time = int(press_time)
    cmd = 'adb shell input swipe {} {} {} {} {}'.format(swipe_x1, swipe_y1, swipe_x2, swipe_y2, press_time)
    print(cmd)
    os.system(cmd)


def find_piece_and_board(im):
    w, h = im.size

    for i in range(int(0.5*h), int(0.6*h)):
        piece_x_sum = 0
        piece_x_c = 0

        for j in range(w):
            pixel = im.getpixel((j, i))
            # 根据棋子的最低行的颜色判断,找最后一行那些点的平均值,这个颜色这样应该 OK,暂时不提出来
            if (50 < pixel[0] < 60) and (53 < pixel[1] < 63) and (95 < pixel[2] < 110):
                piece_x_sum += j
                piece_x_c += 1
        if piece_x_c:
            piece_x = piece_x_sum / piece_x_c
            break

    if not piece_x_c:
        return 0, 0
    
    for i in range(under_game_score_y, h):
        last_pixel = im.getpixel((0, i))
        board_x_sum = 0
        board_x_c = 0

        for j in range(w):
            pixel = im.getpixel((j, i))
            # 修掉脑袋比下一个小格子还高的情况的 bug
            if abs(j - piece_x) < piece_body_width:
                continue

            # 修掉圆顶的时候一条线导致的小 bug,这个颜色判断应该 OK,暂时不提出来
            if abs(pixel[0] - last_pixel[0]) + abs(pixel[1] - last_pixel[1]) + abs(pixel[2] - last_pixel[2]) > 5:
                board_x_sum += j
                board_x_c += 1
        if board_x_sum:
            board_x = board_x_sum / board_x_c
            break

    if not board_x:
        return 0, 0

    return piece_x, board_x


def main():
    while True:
        pull_screenshot()
        im = Image.open("./1.png")
        # 获取棋子和 board 的位置
        piece_x, board_x = find_piece_and_board(im)
        ts = int(time.time())
        print(piece_x, board_x)
        jump(abs(board_x - piece_x))
        backup_screenshot(ts)
        time.sleep(random.uniform(1.2, 1.5))   # 为了保证截图的时候应落稳了,多延迟一会儿

if __name__ == '__main__':
    main()

只用X坐标来调整,最高分是 536

@timmy-gzw
Copy link

timmy-gzw commented Dec 30, 2017

红米5 Plus
目前最高分跳到 500 多 就自杀了

under_game_score_y = 440
press_coefficient = 1.5
piece_base_height_1_2 = 25
piece_body_width = 80

@sam453
Copy link

sam453 commented Dec 30, 2017

荣耀note 8,分辨率 2560x1440

参数:

under_game_score_y = 385
press_coefficient = 1.04
piece_base_height_1_2 = 25
piece_body_width = 110

大概率落在中心点,分数1008了,还不挂,不玩了。。。

@docwei2050
Copy link

under_game_score_y = 390 # 截图中刚好低于分数显示区域的 Y 坐标,300 是 1920x1080 的值,2K 屏、全面屏请根据实际情况修改
press_coefficient = 1.04 # 长按的时间系数,请自己根据实际情况调节
swipe_x1, swipe_y1, swipe_x2, swipe_y2 = 750, 2118,750, 2118 # 模拟按压的起始点坐标,需要自动重复游戏请设置成“再来一局”的坐标
piece_base_height_1_2 = 26 # 二分之一的棋子底座高度,可能要调节
piece_body_width = 102 # 棋子的宽度,比截图中量到的稍微大一点比较安全,可能要调节

华为mate9 pro 分辨率 1440*2550 第一次跑就是很高分,,这个脚本太厉害了,,我用的auto那个

@Kryssss
Copy link

Kryssss commented Jan 2, 2018

各位求个SE的参数

@laobadao
Copy link

laobadao commented Jan 3, 2018

小米 MIX 2040 * 1080

"under_game_score_y":619,
"press_coefficient": 1.492,
"piece_base_height_1_2": 25,
"piece_body_width": 88,

刷到 438 就不刷了 ,学技术去了 。什么都不说了

@mozhuwanjieDEV
Copy link

有木有魅族PRO6 PLUS的?2560x1440 ,5.7的屏幕

@laokangde
Copy link

laokangde commented Jan 3, 2018

魅蓝note3 1920*1080

"under_game_score_y": 300,
"press_coefficient": 1.4,
"piece_base_height_1_2": 25,
"piece_body_width": 80,

改了个1.4 25 和 80 默认参数能跑570分 改完之后1000+还在跳

@cubebbox
Copy link

cubebbox commented Jan 3, 2018

小米note pro 勉强可以用吧
{
"under_game_score_y": 330,
"press_coefficient": 1.178,
"piece_base_height_1_2": 23,
"piece_body_width": 100,
"swipe": {
"x1": 320,
"y1": 410,
"x2": 320,
"y2": 410
}
}

@zysun
Copy link

zysun commented Jan 3, 2018

@cubebbox 我也是小米note pro,用你的参数最多就运行到300

@BlakGriffin
Copy link

求一个S7 Edge能用的参数,谢谢

@mikemelon
Copy link

小米Note
1080*1920

"under_game_score_y": 300,
"press_coefficient": 1.45,
"piece_base_height_1_2": 22,
"piece_body_width": 82

最高620分,绝大多数时候能上500分。

@melooooooo
Copy link

"under_game_score_y": 285,
"press_coefficient": 1.420,
"piece_base_height_1_2": 20,
"piece_body_width": 70,
小米4参数 1000+

@AC-Yoke
Copy link

AC-Yoke commented Jan 5, 2018

机型:华为荣耀8,5.2英寸。魅族pro6,5.2英寸。
分辨率(写明宽高):1920*1080 (亲测应该5.2英寸都可以照这个参数)

具体参数:

{
"under_game_score_y": 300,
"press_coefficient": 1.38,
"piece_base_height_1_2": 30,
"piece_body_width": 75
}

@yaowans
Copy link

yaowans commented Jan 5, 2018

同求小米note3,
自己修改了下,可跳800+,忘记截图了 -。-
{
"under_game_score_y": 300,
"press_coefficient": 1.47,
"piece_base_height_1_2": 20,
"piece_body_width": 70,
"swipe" : {
"x1": 500,
"y1": 1600,
"x2": 500,
"y2": 1602
}
}

@ghost
Copy link

ghost commented Jan 5, 2018

小米5x,通用1920*1080只能跳100多

@MrLevo520
Copy link
Collaborator

对于自适应无视分辨率版本正在开发中,请尝鲜nightly版本

@lk6233160
Copy link

三星S8+,关闭曲面侧屏,屏幕设置FHD+ 2220*1080
参数:
{
"under_game_score_y": 619,
"press_coefficient": 1.38,
"piece_base_height_1_2": 20,
"piece_body_width": 70,
"swipe": {
"x1": 530,
"y1": 1730,
"x2": 530,
"y2": 1730
}
}
跳到2200分手动停了

@liluoao
Copy link
Contributor

liluoao commented Jan 6, 2018

@nanasen-shane 我红米Note4就用的默认参数,刚跳到4300多,想截个图的,再进去成绩被删了

@youur
Copy link

youur commented Jan 8, 2018

红米note4x参数一直不准确

@scholar095
Copy link

有没有哪位大佬有小米6的参数啊?我的一直只有50+

@TianfeiXu
Copy link

先谢谢作者,玩的很开心。 跳了11120,关了,删游戏了。
机型:小米5
分辨率(写明宽高):1920*1080
具体参数:见 #1066 (#1066里谢了怎么修改代码)
autoju-

@NorthNanmu
Copy link

NorthNanmu commented Feb 23, 2018

华为P9 需要关闭手机管家中的自动分辨率
参考@breewf @AC-Yoke

    "under_game_score_y": 300,
    "press_coefficient": 1.11,
    "piece_base_height_1_2": 30,
    "piece_body_width": 75,
    "head_diameter": 60,
    "swipe": {
        "x1": 500,
        "y1": 1600,
        "x2": 500,
        "y2": 1602
    }

@Zhouxuan-C
Copy link

还有在用 红米 Note的小伙伴吗?2333

:红米 Note(增强版)
:1280x720 5.5英寸

"under_game_score_y": 200,
"press_coefficient": 1.000,
"piece_base_height_1_2": 13,
"piece_body_width": 47,

我基本都是跳中间,

@sundice
Copy link

sundice commented Feb 28, 2018

oppo R11.分辨率1080*1920.跳到2000多没耐心跳了,参数以下。连中的几率非常高。

under_game_score_y = 300

长按的时间系数,请自己根据实际情况调节

press_coefficient = 1.0

二分之一的棋子底座高度,可能要调节

piece_base_height_1_2 = config['piece_base_height_1_2']

棋子的宽度,比截图中量到的稍微大一点比较安全,可能要调节

piece_body_width = 85

@winyn
Copy link

winyn commented Feb 28, 2018

机型:红米note3
分辨率(写明宽高):1080*1920
具体参数:
under_game_score_y = 300
press_coefficient = 0.98
piece_base_height_1_2 = 20
piece_body_width = 70

@GangZiGe
Copy link

GangZiGe commented Mar 1, 2018

@winyn 我照你说的调成0.98还是不行啊
8414b7758385596714fe269a57e105d3
还是跳两下就死

@hank619
Copy link

hank619 commented Mar 6, 2018

华为p9

"under_game_score_y": 300,
"press_coefficient": 1.05,
"piece_base_height_1_2": 35,
"piece_body_width": 75,

pic

@XingshengLiu
Copy link

@good2hub 小米3电信版定义的那个函数如何使用么?

@JingLuo2017
Copy link

魅蓝note5,分辨率 1920*1080
"under_game_score_y": 300,
"press_coefficient": 1.0,
"piece_base_height_1_2": 25,
"piece_body_width": 80,
"head_diameter": 60,

@livingli
Copy link

livingli commented Apr 5, 2018

荣耀9,分辨率1920*1080,最高:没时间测试6000+以上随便弄
"under_game_score_y": 300,
"press_coefficient": 1.0,
"piece_base_height_1_2": 20,
"piece_body_width": 70,
"head_diameter": 60,
"swipe": {
"x1": 500,
"y1": 1600,
"x2": 500,
"y2": 1602

@leon332157
Copy link
Collaborator

@livingli 谢谢啦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests