Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.
/ BOT-Bombcrypto Public archive

Archive of a BOT for the "Play-to-Earn" game Bombcrypto.

Notifications You must be signed in to change notification settings

HugoCls/BOT-Bombcrypto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bombcrypto BOT Project

Table of Contents

  1. Project Introduction
  2. Technical Overview

Project Introduction

Bombcrypto is a game following the "Play-to-Earn" model, featuring a group of bomb heroes in search of the BCOIN. The game operates on the Binance blockchain, with the BCOIN token serving as the primary in-game currency on the BNB Chain. The project aimed to maximize BCOIN generation by automating all game tasks, implementing optimized rules, and more.

Note

On November 29, 2021, BCOIN reached its peak value of $8.2 before plummeting significantly.

Technical Overview

Important

This project was developed during my early coding journey (Nov 2020 - Jan 2021), and therefore, the syntax, variable naming conventions, etc., reflect that learning stage.

Maximizing Gameplay

The optimized loop

Basically, in Bombcrypto you have heroes who work alone in this zone made up of chests and obstacles.

Bombcrypto map

Your heroes move around the map by dropping bombs that explode the chests, and when there are no more chests a pop-up appears and you have to click on it to get them working again in a new map.

Houses

When your heroes are tired, they need to sleep, and you can either let them rest peacefully (you can see it with zzz on top of their heads), or place them in a house to get a quick rest. (houses also cost BCOIN, at that time their price was between 1,2k-$250k)

Houses

Therefore are two parameters to optimise:

  • Always have 15 heroes working while the others rest in houses
  • Launch new Maps as soon as they've finished

Whenever you're not on the map screen, the heroes aren't working, so every interaction in the script has to be as quick as possible, otherwise you lose money.

Browser Management

With investment in multiple accounts being the most cost-effective, effective management of multiple browser instances was essential to maximise playability.

Each browser was checked independently to ensure optimum performance and avoid computer vision errors.

This included:

  • Connection to Metamask and independent management of the chrome extension on different browsers
  • Layout of multiple google chrome browsers on a single screen
  • Management of relative coordinates to link a state to an action for the right browser

The game loop was then performed one by one for each browser.

Description de l'image

Note

If I had to do it again today, I'd use multithreading/multiprocessing and better management of the different game instances.

Automating Gameplay

Computer Vision & Automated Input Generation

The project utilized computer vision for automatic generation of keyboard and mouse inputs.

For keyboard input I used autopy, pywinauto, pyautogui...

For image recognition, I used matchTemplate function from OpenCV, which recognises an image template in a larger image.

Technically, it calculates the correlation between a template and regions of an image to find occurrences of the template.

Description de l'image

All other computer vision functions have been created by hand using colour, image processing and other means using matchTemplate or equivalents.

You can see my whole library of templates at the following path: tree/main/data/images.

Captchas & Server Crash Handling

There were often server problems, which forced us to create systems to detect server crashes, without which our bot could remain blocked for hours, refreshing the page.

In addition, anti-bot captcha systems were put in place, which we easily bypassed using hand-created functions.

Captcha 1 Captcha 2

I refer you to my repository dedicated solely to this at this address: Captcha-Solving

Captcha

Supervision and Monitoring

Supervision and monitoring mechanisms were developed to maintain oversight of the automation system. This included sending periodic screenshots, logging detailed action records locally, and providing important information logs on Discord for real-time monitoring.

Running logs Working efficiency Visual feedback
Logs Logs Logs

This README provides an overview of the Bombcrypto Automation Project, focusing on its technical aspects and methodologies utilized for efficient gameplay automation. Further details and enhancements may be added as the project evolves.

About

Archive of a BOT for the "Play-to-Earn" game Bombcrypto.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages