julianperrott / simcitybuilditbot Goto Github PK
View Code? Open in Web Editor NEWA SimCity BuildIt Bot
A SimCity BuildIt Bot
It would be cool if you could turn this into an actual running program, when bluestacks is running you open up the program and let it run.
Hello Julian,
is there also a manual, so that the bot runs at all?
I get the bot started in principle and then?
When running the code you give a warning height of window must be 1080
and width of window must be 1920
and all touches and screen captures depend on these dimensions, however they are very difficult to get on laptop screens (I can see you have a very big screen).
So getting the dimensions of the emulator when first run and using percentages would be much better!
In /Bot/CaptureScreen.cs you use
Bitmap bmp = new Bitmap(size.Width, size.Height, PixelFormat.Format32bppArgb);
Graphics.FromImage(bmp).CopyFromScreen(rect.left + x, rect.top + y, 0, 0, size, CopyPixelOperation.SourceCopy);
To capture the screen, but as I noticed this requires MEmu to be on the screen to be captured, and not in background so I used the capture screen in adb and graphics to crop the image, and now it can be run in the bacground, I'm planning to make this a pull request but thought to add the code here as a start.
in the same class I commented your code and added the following beneath it:
RawImage rawImage = device.Screenshot;
Bitmap bmp = (Bitmap) rawImage.ToImage(PixelFormat.Format32bppArgb);
var imageHight = bmp.Height;
var imageWidth = bmp.Width;
// crop the image
Rectangle cropRect = new Rectangle(x, y, size.Width, size.Height);
Bitmap src = bmp;
Bitmap target = new Bitmap(size.Width, size.Height);
using (Graphics g = Graphics.FromImage(target))
{
g.DrawImage(src, 0, 0,
cropRect,
GraphicsUnit.Pixel);
}
// end crop
return target;
maybe the crop won't work on your screen because I'm still working on figuring out the dimensions.
best regards!
Any possibility to decrypt (remove password) from the rar file with item images. Would love to build on your work to evolve a SC bit!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.