{"id":24347725,"url":"https://github.com/pasanlaksitha/google-santatracker-gamebot","last_synced_at":"2025-04-15T03:06:44.503Z","repository":{"id":213286099,"uuid":"733329642","full_name":"Pasanlaksitha/Google-SantaTracker-GameBot","owner":"Pasanlaksitha","description":"I coded a simple script from multiple ways to gain a score in the Google Christmas Easter Egg Game(Santa Tracker). This website has a collection of games to play, and this script is for a game called Wrap Battle. https://santatracker.google.com/intl/en/wrapbattle.html","archived":false,"fork":false,"pushed_at":"2023-12-19T13:25:03.000Z","size":68,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-15T03:06:39.169Z","etag":null,"topics":["game-bot","game-scripts","gamebot","google","pyautogui-automation","python","santatracker"],"latest_commit_sha":null,"homepage":"https://santatracker.google.com/intl/en/wrapbattle.html","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/Pasanlaksitha.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-12-19T04:48:55.000Z","updated_at":"2024-12-31T17:36:30.000Z","dependencies_parsed_at":"2024-01-14T16:31:04.364Z","dependency_job_id":null,"html_url":"https://github.com/Pasanlaksitha/Google-SantaTracker-GameBot","commit_stats":null,"previous_names":["pasanlaksitha/google-santatracker-gamebot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pasanlaksitha%2FGoogle-SantaTracker-GameBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pasanlaksitha%2FGoogle-SantaTracker-GameBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pasanlaksitha%2FGoogle-SantaTracker-GameBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pasanlaksitha%2FGoogle-SantaTracker-GameBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pasanlaksitha","download_url":"https://codeload.github.com/Pasanlaksitha/Google-SantaTracker-GameBot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248997086,"owners_count":21195799,"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":["game-bot","game-scripts","gamebot","google","pyautogui-automation","python","santatracker"],"created_at":"2025-01-18T11:32:10.071Z","updated_at":"2025-04-15T03:06:44.475Z","avatar_url":"https://github.com/Pasanlaksitha.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Google Santa Tracker Bot Documentation\n👇 Game you need to beat Highscore \u003cbr\u003e\nhttps://santatracker.google.com/intl/en/wrapbattle.html\n## Introduction\nThis documentation provides information on how to use and understand the Google Santa Tracker Bot. The bot is designed to play the Google Santa Tracker game by automatically navigating through the game's interface using pixel colour detection and simulated keyboard inputs.\n\n## Dependencies\n\n* Python 3.x\n* PyAutoGUI library\n* Keyboard Library\n\nInstall the required dependencies using the following commands:\n\n```\npip install pyautogui\npip install keyboard\n```\n\n## Getting started\n\n### 1. Clone the Repository\n\nClone the Google Santa Tracker Bot repository to your local machine:\n\n```\ngit clone https://github.com/your-username/google-santa-tracker-bot.git\ncd google-santa-tracker-bot\n```\n\n### 2. Adjust Screen Coordinates\n\nOpen the `santa_tracker_bot.py` file in a text editor and update the screen coordinates to match your screen configuration. Modify the values of `c1`, `c2`, `c3`, and `c4` based on the cells or circles in the Google Santa Tracker game on your screen.\n\n### 3. Run the Bot\n\n```\npython color-identify.py\n```\n\n### 4.  Quit the Bot\nPress the `q` key on your keyboard to stop the bot.\n\n\n## Understanding the Code\n\n### Screen Coordinates\n\nThe screen coordinates (`c1`, `c2`, `c3`, `c4`) represent the positions of the cells or circles in the Google Santa Tracker game. These values need to be adjusted to match the layout on your screen.\n\n### Color Codes\n\n* Grey: RGB(51, 51, 51)\n* Black: RGB(0, 0, 0)\n\n### Pixel Color Detection \n\nThe line `pyautogui.pixel(217, 534)[0] == 51` in the code is responsible for detecting the colour of a specific pixel on the screen. This is achieved using the pyautogui.pixel() function, which returns the RGB color values of the pixel at the specified coordinates.\n\n217 and 534 are the X and Y coordinates, respectively, of the pixel being checked.\n`[0]` indicates that we are retrieving the red component of the RGB colour values, other arguments in this function are `[1] `and `[2]` which are Green and Blue respectively.\nThe expression `== 51` checks if the red component of the pixel colour is equal to 51. \n\n\n\nThe bot uses pixel colour detection to identify the game's current state based on the colour of specific pixels.\n\n### Main Loop\n\nThe main loop continuously checks the pixel colour at predefined locations. Depending on the colour detected, the bot sends corresponding keyboard inputs to navigate the Santa Tracker game.\n\n## Customization\nFeel free to customize the bot according to your preferences or specific game variations. You can modify the pixel colours, screen coordinates, and keypress actions as needed.\n\n## Troubleshooting\nIf the bot is not working as expected, consider the following:\n\n* Ensure that the screen coordinates are correctly set for your display.\n* Check for any updates or changes in the Google Santa Tracker game that may affect pixel colour detection.\n\n## Extra \n\n### What is `imagedetect.py`\n\nWell when I first started to write this program, I didn't notice that there is only one key comes in each row its not shuffling, so before I realised that, I tried a script to screenshot each arrow and identify them on the screen when they closed and pass the circle initiate the keypress i wrote only a half and give up script because its useless\n\n## Note \n\n###  ___BUG!___\nWhen I was testing this game, I noticed that there was a problem with the game\nthat is, when a key circle closes to the pressing zone the game doesn't concern if a wrong arrow key is pushed. If we push with the correct key, that means once we press all 4 keys at once each time a circle passes, we score a point. \n\n___so i coded a shorter program for this if you need you can configure it to initiate when color code is detected like `color-identify.py` below one is  only a concept its works without coordination___\n\n```python\nimport keyboard\nwhile not keyboard.is_pressed('q'):\n    for i in ['left','up','down','right']:\n        keyboard.press_and_release(i)\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpasanlaksitha%2Fgoogle-santatracker-gamebot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpasanlaksitha%2Fgoogle-santatracker-gamebot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpasanlaksitha%2Fgoogle-santatracker-gamebot/lists"}