![]() The first pixel in each line represents the top left of the panel. The tops of the panels are always the same distance from the top of the screen.įinding the tops of the panels required looking along this line for pixels close to the colour of the bounding line around the panels (See indicator red lines at the top of each panel below).Įach continuous block of matching pixels is one panel. The way I solved this is described below: Usefully each panel is the same size, so If we can find where a panel starts, then the item will always be in the same place and all we need to do is to recognise the item in the panel. Dragging within the list from right to left reveals more items. The window contains a number of panels, each representing an item for sale. ![]() This was solved using perceptual hashing with a dictionary of categorised image hashes.Īssuming we have a shopping list of items we need, then the goal is to buy those items.Ĭlicking on the Global trade building brings up the trade window. The main new problem I had to solve was recognising images from the game screen. Next I tackle buying from "Global Trade" and Selling crafted items to generate in game currency. Red means we don't have enough.Ĭollecting a crafted item requires touching the building. Determining if we need to craft raw materials for craft-able items is found out by clicking on the item's button and looking to see the colour of the required materials. So we can swipe from the button to the crafting location to build the item. The craft-able items are laid out on buttons in specific places. For example the Hardware store has a Mass Production factory above it and both of these are unique buildings, so when we are at either in the building cycle we can move to the other.īuild an Item in either a factory or commercial building This is done by positioning selected buildings (one commercial and one factory) in a known configuration and then clicking above or below to switch. Move between a factory and a Commercial building There are buttons on the side of the building name which will cycle around the factories or commercial buildings. A screen shot of part of the MEMU application is taken and OCR'd. The name of the building is shown at the top of the screen, this is read using OCR (Optical Character Recognition) using Tesseract Open Source OCR Engine. It helps to turn on the developer options for 'pointer location' and 'showing touches'. This can be done by touching the centre of the screen using ADB (Android Debug Bridge), a building must be located at the centre of the screen when the bot is started. To build a crafting bot I needed to be able to do the following: Select a building
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |