{"id":15134127,"url":"https://github.com/kroshechka/pandabot","last_synced_at":"2026-01-18T11:42:23.856Z","repository":{"id":158648942,"uuid":"626533268","full_name":"KroSheChKa/PandaBot","owner":"KroSheChKa","description":"A bot that perfectly plays the game for you","archived":false,"fork":false,"pushed_at":"2023-07-20T07:18:55.000Z","size":45,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T22:42:09.943Z","etag":null,"topics":["bot","game","game-automation","gamebot","image-processing","opencv","opencv-python","pyautogui","python","vk-bot","vkbot","vkgame","vkgamebot","vkontakte","vkontakte-bot","win32api"],"latest_commit_sha":null,"homepage":"https://vk.com/app8025526","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KroSheChKa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-11T16:53:04.000Z","updated_at":"2024-12-31T17:36:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"95d83b13-8efb-42bc-acef-537edcc64a83","html_url":"https://github.com/KroSheChKa/PandaBot","commit_stats":{"total_commits":23,"total_committers":2,"mean_commits":11.5,"dds":0.08695652173913049,"last_synced_commit":"7df870182d7f48b9f2f3b7869f419af201866c84"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KroSheChKa%2FPandaBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KroSheChKa%2FPandaBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KroSheChKa%2FPandaBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KroSheChKa%2FPandaBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KroSheChKa","download_url":"https://codeload.github.com/KroSheChKa/PandaBot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411195,"owners_count":20934650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","game","game-automation","gamebot","image-processing","opencv","opencv-python","pyautogui","python","vk-bot","vkbot","vkgame","vkgamebot","vkontakte","vkontakte-bot","win32api"],"created_at":"2024-09-26T05:02:55.783Z","updated_at":"2026-01-18T11:42:23.817Z","avatar_url":"https://github.com/KroSheChKa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PandaBot\n\n## A game bot that paves the way for the panda\n\n**The bot works using the `pyautogui` and `win32con/api` libraries**\n\u003eI don't really like pyautogui for its slow speed, but in this case it's not required.\n\u003e...and this is one of my first projects, so I used that simple library\n\nVideo how PandaBot performs:\n\nhttps://user-images.githubusercontent.com/104899233/232223120-c5344b1e-ae10-4995-ab47-65c4b7ee39b0.mp4\n\n\u003e **Full [video](https://www.youtube.com/watch?v=MLeEA3e4K_A\u0026ab_channel=KroSheChKa) in my [YouTube](https://www.youtube.com/@kroshechka)**\n----\n\nThe game is built on the principle that you have to lengthen a stick so that it falls on the next column.\n\n- For each successful fall `+1 point`, as well as for hitting exactly in the center `+1 bonus point`\n- Did you understick or overstick? - **game over**.\n\n---\n\n## The idea\n**The bot works as follows:**\n- Screenshot of the game area\n\u003e There is no need to make a screenshot of the entire game screen, just a line, `1 pixel height` at the level of the red dash (center of the column)\n- Determine the distance to the center of a column. (Iterate each pixel in the line, checking if its color values are the color of the center)\n\n- Calculate how much time it would take to press the left button to hit exactly in the center of the column\n\u003e As the stick grows at a `constant velocity`, we can assume that the **distance to the column is exactly proportional to the time spent on the \"growing\" of the stick**.\n\n```python\nseconds = 0.0694 + (x - 77)/613\n```\n- Press a button, release and wait for the panda to pass the way and return to the starting position\n\n...repeat\n\n**In fact, the bot can work for as long as you want!**\n\n---\n\n## How to launch\n\n### [Game](https://vk.com/app8025526)\n\n*As I have written in my previous works, the bot is written for a particular environment on the computer, the `specific location` of the window, the screen resolution, etc.*\n\nTo run this bot, you need:\n\n- Install [python 3.X](https://www.python.org/downloads/) (3.10 recommended) together with `IDLE` on your computer **(you should run the code via IDLE!)**\n- Clone this project by this command somewhere on your computer:\n\u003e **Make sure you have downloaded [git](https://git-scm.com/downloads)!**\n```\ngit clone https://github.com/KroSheChKa/PandaBot.git\n```\n- Open cmd in the created folder or press RButton in the folder and click \"`Git Bash Here`\" and paste that:\n```\npip install -r requirements.txt\n```\n\n**Particular case:** *If you have a monitor 3440x1440, then simply place the window with the game exactly half the screen on the left, set the **window scale 125%** and run it via `Python IDLE`*\n\nIn other cases it is possible to run this code on your computer, **but** you will have to `change some values` depending on the resolution of your monitor, such as:\n\n```python\n# You have to change 'left' and 'top' unless you have 3440x1440\npic = pyautogui.screenshot(region = (left, top, width, 1))\n```\n\u003e [Help](https://pyautogui.readthedocs.io/en/latest/screenshot.html) to deal with `screenshot region`\n\n**Сonvince that the width of the screenshot covers the whole game area!**\n\n```python\n# Also check whether the color of the center of the column matches this data\nif r == 253 and g == 10 and b == 1:\n```\n\n**REMEMBER** that the cursor must always be on the game area for the bot to work.\n```python\n# X and Y should be in the game area\nwin32api.SetCursorPos((x,y))\n```\n\n### To start the bot press P. The same as to cause a pause. Press Q to end the bot completely.\n\n----\n\n*Any suggestions? You found a flaw?*\n\n-\u003e Leave a comment in [Discussions](https://github.com/KroSheChKa/BasketBot/discussions)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkroshechka%2Fpandabot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkroshechka%2Fpandabot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkroshechka%2Fpandabot/lists"}