Please do Tower Twist it will be very interesting to see how you approach it...
@stewie055
4 жыл бұрын
Dark souls
@Redachouhani
4 жыл бұрын
You did bro! Big time!
@greenin5537
4 жыл бұрын
What about the old classic vector
@shreyassable4981
4 жыл бұрын
EM, the creator of Stick Hero wants to know your location.
@manuelnovella39
4 жыл бұрын
Wow, this was so much fun to see, and so interesting! Thanks! Keep doing similar stuff, I think people will love it!
@user-eo5bh2zg2
4 жыл бұрын
Since the guy has to run across the distance of the bridge, if you pass distance as the parameter for sleep you should get a pretty dynamic/accurate result
@gouravchouhan1790
3 жыл бұрын
Someone's here is smart
@undefinedchannel9916
3 жыл бұрын
distance is how long it takes for the bridge to fall but he'll also need to take in account the time it takes for the stick figure to run across.
@denic6861
3 жыл бұрын
@@undefinedchannel9916 you’d just have to divide the distance by the constant speed of a player moving per pixel and that’ll give you a near perfect rest time
@prenomnom5637
3 жыл бұрын
i thought the same
@nabhyaplayz9665
3 жыл бұрын
i dont think that would work perfectly as the distance is not the same as the time the person has to hold on the screen bc the distance can be like lets say 100 px but i think holding only 0.1 sec on the screen would not make that far as you can see in the video too it sometimes drops a little bit far so its no perfect but it works so for the perfection someone would have to actually calculate the exact distnce it draws in like 1 sec and then we can get the value for 1 milli sec according to that
@ashuborhade4170
4 жыл бұрын
Rumor has it... Engineering Man is secretly The Stick Hero
@tommasog.5561
4 жыл бұрын
Actually I tried to recreate the script and I found a lot easier to just find the first gap and then the little red box at the center of the second column. It worked fine
@haydencordeiro
4 жыл бұрын
Hey can you help me set up the adb
@ishkapoor7931
4 жыл бұрын
hey can you help me with the same to find the gap between the pillars... I'm really confused!!!
@az-db3rd
3 жыл бұрын
I thought the same when i saw the video
@asoliev698
3 жыл бұрын
Haha exactly what I was thinking
@Xevion
3 жыл бұрын
@@haydencordeiro Why do people ask for help on KZitem comments? And then like the comment? Figure it out yourself dumbasses.
@teenspirit1
3 жыл бұрын
The stick growth uses an easing algorithm, so at the start it grows slowly and then grows a little faster. That's why you miss on short sticks and very long ones.
@SunnyNagam
Жыл бұрын
I bet you could account for that by making the percentage decrease with the distance by some other coefficient. Like instead of * .98 it's * (.98 - 0.000002*distance)
@Hyuts
4 жыл бұрын
The flow of this video feels like the perfect speed for me.
@gouravchouhan1790
3 жыл бұрын
Yeah, that exactly how everything should be. Perfect
@wilcosec
4 жыл бұрын
The end of loop sleep time could be a function of the distance.
@marnotto8269
4 жыл бұрын
Smort
@kieudung
3 жыл бұрын
plus some times for the character to move between 2 pillars
@6s6
4 жыл бұрын
Can you do a tutorial on making a basic Android app? Or go over an introduction to adb and scrcpy?
@maxikuck1308
4 жыл бұрын
Instead of multiplying by .98, you should've subtracted by a constant value. the problem was that the stick doesnt spawn exactly at the start of the gap but a few pixel to the left.
@Hasan...
4 жыл бұрын
Easier way: Have the exact height for the 'Red box', and start and stop based on the distance till the Red box, without worrying about any Blacks (or even gaps) because the starting position of the Ninja remains the same on the screen.. It's a matter of minor trial and error to calibrate. Great video E-Man !
@Hakim_fz
2 жыл бұрын
اخ حسن ايش رايك ابتدي بتعلم لغة الجافا او بايثون؟
@innerinsights224
Жыл бұрын
Someone always comes along and shortens something you thought was destined to be much more
@klarkforgetit2642
4 жыл бұрын
It would be interesting if the program would find this percentage on his own by measuring how long it takes to grow the stick a certain distance.
@dummypg6129
4 жыл бұрын
This is actually an interesting problem-solving in programming to control android. I did same trick for Piano Tile game.
@simobermaki
4 жыл бұрын
I've been searching for a while for a way to automate some stuff on android, i did know about adb and adb shell since i've been rooting for some years now, but damn to be able to use python as well!! that's mind blowing, is there a documentation on shell commands? Have you thought about social media automation?
@befruky5868
4 жыл бұрын
you most likely will get banned by instagram twitter... if you automate follows likes as they have a limit
@Jack-yz6yp
4 жыл бұрын
@@befruky5868 For this you're probably better off using selenium (unless it's something like Snapchat where you can't use a web client)
@dairop3220
4 жыл бұрын
@@Jack-yz6ypYep selenium is better but I don't think it work for android, only on PC
@naveenkumarpolipalli5930
4 жыл бұрын
Engineering Communicated with Unparalleled Clarity 👏🏻
@intellectualgravy9796
4 жыл бұрын
I am curious is the app running on his android phone or he has some emulator like Genymotion or something ?
@EngineerMan
4 жыл бұрын
I'm using a physical device and scrcpy for the mirroring.
@intellectualgravy9796
4 жыл бұрын
@@EngineerMan Thanks I will have to read up on that. Very neat.
@laizerwoolf
4 жыл бұрын
@@EngineerMan would it be easier if you use android emulator instead? And one more question, does automating other game have similar workflow like, screen capture, detecting certain color on certain part and adding certain input? I'm working on mobile development, and some bit of python. I think game automation would be an interesting project to work on. Idle games should be a simple project to automate, right?
@Ammarirfanofficial
4 жыл бұрын
@@laizerwoolf for most games it should work like this but for shooting games you might need an esp and capture that and as for idle games yea it should be this simple
@laizerwoolf
4 жыл бұрын
@@Ammarirfanofficial thanks for the reply!
@n1nly617
4 жыл бұрын
please help I have an error: Traceback (most recent call last): File "stickHero.py", line 50, in start, target1, target2 = transitions ValueError: not enough values to unpack (expected 3, got 0)
@SKREFI
4 жыл бұрын
transitions are not filled with the data, you have messed something up when checking the black values. transitions should be a list with 3 elements, instead, you have got an empty list.
@koldyn2193
4 жыл бұрын
try this: pixels = [list(i[:3]) for i in image[1920]] i do no why EM take 1400 cause our screen 1920 pixels, and no matter what we can calculate all 1920 and still get black values from numpy array or simply if you want to turn on the dX, dY, Xv, and Yv coordinates, they are in your developer > input section and manually take coordinates
@Jakub1989YTb
4 жыл бұрын
Great idea! I was thinking about automating few android games my self too. Can you please elaborate more about how to connect the phone and get the adb working? That's the only part this video is missing.
@swing-o-gram
4 жыл бұрын
Android is super easy to connect via ADB. All you'll need is the adb drivers and you're good to go in the command line.
@1996Pinocchio
4 жыл бұрын
There are probably enough videos about it on youtube already :)
@Katatonya
4 жыл бұрын
you can do it through wifi too,, check google on how to
@GodBurstPk
4 жыл бұрын
Why not dynamicly fetch display size? # just replace shell with your own shell method or connection object shell. def display_size(self): size = [int(val.split("=")[1]) for val in self.shell_command("dumpsys window | grep 'DisplayFrames'").split(" ") if "=" in val] return {"width": size[0], "height": size[1]}
@yamikuro1098
4 жыл бұрын
I would really want to see how you automate game like "Summoners War" that would be a challenge ^^
@Nirvanaki
4 жыл бұрын
i am using autoclicker to finis hmy toa and toah. you can start with that :P
@alexdominguess
4 жыл бұрын
Good job! I would have a diiferent approach on how to find the distance by finding the red square that each column has using the pyautogui that has a function that finds an specific image in the screen and return the center position of that and then do all the math you did.
@xgriff91
4 жыл бұрын
Why not check for the first red pixel then compute the distance ? Amazing video as always EM
@spicytelescope5487
4 жыл бұрын
I think an answer might be that the background (of what we know, it can changes multiples times) may contain red pixels before the one you're trying to get the x-value of. So this algorithm doesn't work with any given background and therefor is not "automatic" !
@xgriff91
4 жыл бұрын
@@spicytelescope5487 Yes I thought about that but it would be unlikely that one pixel of the row would have the exact same RGB value. But I agree that EM's way prevents it
@xgriff91
4 жыл бұрын
@@spicytelescope5487 Plus we could check for the red pixel only once the first black pixel of the platform has been found, as EM said there is plenty ways to implement this
@CHITUS
2 жыл бұрын
Since the guy has to run across the distance of the bridge, if you pass distance as the parameter for sleep you should get a pretty dynamic/accurate result
@Rafa_guitars
4 жыл бұрын
I just automated tinder 😅. Next step would be to integrate it with a neural network that filters out beauty people
@TheFreeSpiritKID
3 жыл бұрын
Well played :D
@oscwavcommentaccount
4 жыл бұрын
I should learn python again. I kinda forgot it.
@yashindane2844
4 жыл бұрын
Please do 2048
@bigjoepro75
4 жыл бұрын
This was INCREDIBLY interesting! Hope you do more stuff like this in the future.
@UpDownAndUnder
4 жыл бұрын
Woah, this rekindled my interest in coding again. Nice work, EM! I would like to see how you'd do with some bullet hell games like Bullet Hell Monday
@chillappreciator885
3 жыл бұрын
Ahah, guy is looking on 0s and 1s in terminal: "I can see it represents mostly what on the screen"
@undefinedchannel9916
3 жыл бұрын
its the rgb color values. anything thats 0 0 0 means black anything else means color
@jonahrobberts2909
2 жыл бұрын
Hey Engineer Man, where did you learn python?
@Pertinate
4 жыл бұрын
Btw, you can see the coordinates (it's actually the delta/change in touches) from the developer options on your android device
@bargey13
4 жыл бұрын
This comment saved me! if you want to turn on the dX, dY, Xv, and Yv coordinates, they are in your developer > input section.
@jemakrol
3 жыл бұрын
Python is just awesome. Great video! Beyond the scope I know but I'd scan from top-left downwards to get the proper starting location of Y without hardcoding. That would suggest breaking out the transition detection into a reusable function. Furthermore, I feel it's kinda waste if time to store the screenshot on file. Haven't tried the libs in question but if it's possible to screen cap directly inro memory I'd consider it way more neat. Finally it would be interesting to actually clock the time drawing the stick and dynamically adjust the timing along the way to get better accuracy. Of course, that's all overkill for a proof of concept as shown here. However, it does take into account good practices and interesting extensions like reusability and device independent code. I believe the code required to do it wouldn't be too complicated. Again, great video!
@subarusama696
3 жыл бұрын
i should sleep, but first i need to import time
@charliebrown1947
4 жыл бұрын
3 minutes in im wondering why you're saving the screenshot to a file then converting to an object when its already an object
@animenosekai_edit
4 жыл бұрын
I don’t think that you really need to save the screenshot. You could maybe just pass the raw image got with screencap to Pillow 🤔
@mrgeniasworld4374
3 жыл бұрын
Or use io.BytesIO
@RoboticUzi1x
3 жыл бұрын
Question, what type of terminal is that? (im a beginner so don't judge pls lol)
@bowuigi
3 жыл бұрын
It is bash (the default shell) running over ssh
@ScadooshGoat
4 жыл бұрын
I love the logic used to solve problems. Want to see more videos like this.
@krazyinstinct
4 жыл бұрын
Wouldn’t it be easier to search for the red box since the pillars seem to stay at the same y level all of the time?
@felineentity
4 жыл бұрын
Taking a screenshot makes sense, but I wish there was a more "live" way of reading screen pixels in general. If you could read pixels as they update you could press the screen until a certain pixel above you turns black, always giving you the right distance.
@EngineerMan
4 жыл бұрын
I intend to experiment by using opencv to monitor the screen in real time then apply a solution in that way. Stay tuned.
@hexa-b
4 жыл бұрын
@@EngineerMan your resolution is the "long pole in the tent" when it comes to using CV. For this simple task it would be suitable, however operating on text/more intricate designs makes it far less trivial. Also, maybe you can consider saving the screencap to a bytesIO object to ensure you're always operating on the correct image. You can reduce your time.sleep that way as well. Thanks for the videos! Keep it up!
@Sole880
4 жыл бұрын
You should show a sped up clip of your automated game at the end, like an hour of it playing the game all sped up to a minute for us to watch, and if you stick an ad the first 3 seconds in to it then you can most likely get good ad view time, just make sure you have good attention grabbing- remix making music for the sped up clip so it will take their attention before they decide to stick through the ad
@thedevhassan
2 жыл бұрын
how did you open the game in pc?
@ExplorerSpace
4 жыл бұрын
hello engineer man. i want to subscribe to your channel, but i cant for some reason that i dont know about. subscription does not get assigned when i subscribe. what is happning?
@EngineerMan
4 жыл бұрын
It actually says you subscribed 8 months ago.
@ExplorerSpace
4 жыл бұрын
@@EngineerMan well I did 8 months ago, but KZitem subscribe button still display as red. And I found that that happens for bunch of channels
@trevor8416
3 жыл бұрын
I would've went with 2.4
@franciscolucarini8761
4 жыл бұрын
How we know the ip and port??
@vickteur
Жыл бұрын
The fourth number “255” is the max white and “0” is black. If the pixel is solid black then it would be R(0), G(0), B(0) and solid white would be R(255), G(255), B(255). R, G, and B stand for Red, Green, and Blue. I should be right
@rednassie1101
4 жыл бұрын
If you want to do it really overcomplicated: Do the following Check If pixel != black and store it Then you'll get _____,-------------,______,-------- Then do a 2D convolutional algorithm with a kernel of [1,-1] Then you'll get ________|______,______|____ | Basically it has small peaks and holes where the transitions are.
@hridaybarot4730
4 жыл бұрын
I have an Idea. You can delay the loop dependeing on the Distance. For example you can use a map funtion (The arduino One) . def map(l x, in_min, in_max, out_min, out_max) { return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; } if You don;t know aht it does, check out : www.arduino.cc/reference/en/language/functions/math/map/ It is worth it.
@niklaskras5498
2 жыл бұрын
if you dont want to write the image to your harddrive all the time you can use img = np.array(pil.open(io.BytesIO(image))) with numpy, PIL and io to convert it for image recognition or whatever
@gavin5410
3 жыл бұрын
. . . ignore = True extra = 0 for i, pixel in enumerate(pixels): r, g, b = [int(i) for i in pixel] if ignore and (r+g+b) != 0: extra++ continue . . . distance = gap + target / 2 + extra . . . Is this unnecessary? Could it lead to fixing the issue where the stick is not always perfect? Is it a different problem?
@windowsxp570
3 жыл бұрын
plot twist: all that code was fake and e man is just really good at stick hero
@Aru8675
Жыл бұрын
Teach us and Make a bot for Minesweeper game to display hidden mines using bot, or bot should be capable of playing game without any mistake to the end of game for any android game. Can we use BlueStacks for bot making process? Because BlueStacks also provides us to keep something in background
@anilsharma-ev2my
4 жыл бұрын
How we found the free energy of Herons fountain Bell siphoning Inverted siphoning Siphon How we got maximum heat by circulating water through all the system and how much cycles if we take 100 meter long water cycles through the zig zag motion ?
@xxviii1765
4 жыл бұрын
Hi, is it possible to make it like that it takes a screenshot from a specific area (X, Y) not full screen with the code below? image = device.screencap() with open('screen.png', 'wb') as f: f.write(image)
@rishikeshkanabar4650
4 жыл бұрын
Hi I dont know where someone would be there to answer this but when I tried 1400 index for the image, I got 0 parameters. I tried out more values and at 1700, I get a score of about 35 and then I get the error : ValueError: not enough values to unpack (expected 3, got 1). I dont know what to do here. Can you please help me out? Thanks for this amazing video.
4 жыл бұрын
i have this err Traceback (most recent call last): File "c:/Users/Rangel/Desktop/BOT.py", line 48, in start, target1, target2 = transitions ValueError: not enough values to unpack (expected 3, got 0)
@pitipatwongsittikan9636
3 жыл бұрын
May I ask, what emulator are you using? I'm currently using Bluestack5 and there seems to have a lot of UIs I dont need. The one in the VDO look simple and clear. How do I do that?
@erikysilvagomes5496
2 ай бұрын
I put some conditions on the coefficient: the smaller the distance, the smaller the coefficient. I think it is a great deal to also put some AI to play it!
@st01c39
3 жыл бұрын
Hi. I just want to run your source code from github but I got a problem with 'unresolved reference 'ppadb' and some imports. IDK what to do please help anyone?
@benedekszabo254
3 жыл бұрын
Hey, is there any way that you run a code like this on the phone itself? If so, what changes should I make to this code? Í'm using pydroid for Android, and its terminal can do these actions, but I have no idea if you can do the "device.shell()" part on the phone itself.
@Luvice2
4 жыл бұрын
It may seem a stupid question (i just started programming), but how does he open the terminal with the folder already opened? Every time i want to run a python script do i have to change the folder in the terminal? What does the dot mean when he writes ./stick_hero.py and why doesn't he write python3 to run it? PD: Sorry if these are basic questions
@MaKaNufilms
3 жыл бұрын
Why not convert the image to grayscale first since you are looking for black pixels. And afterwards use a threshhold for everything above zero to become 1. turns the problem in a very easy binary problem.
@manastiwari7809
4 жыл бұрын
How about making the sleep time equal to hold time + distance/speed of ninja + screen change time. It would make it less annoying :P
@marty40
4 жыл бұрын
I couldn't unpack any values from the transitions. Turned out my image[value] was too low. Works now ;)
@mikaelh9584
4 жыл бұрын
Same here :)
@KrisS-nh8lr
3 жыл бұрын
@@mikaelh9584 @Martijn Facee Schaeffer same here sir....how to solve it? change image[value] to what?
@nikau2
4 жыл бұрын
Instead of calculating the time, why don't you put a marker at the distance needed but going vertically above the platform. You could then stop pressing the screen when the stick reaches the distance.
@pvp_is_fun9664
3 ай бұрын
could you make tutorial summoner wars : sky arena in bluestack or other emulator like mumu player to automate task. i can't connect any emulator. i'm looking forward
@BestHelp07
4 жыл бұрын
anyone can please help me , i want to get a desired amount in ludo game , it is really too hard, it will be challange for you too, to do that and it will help me also. please let me know
@ishkapoor7931
4 жыл бұрын
can you help me with my code? I'm doing the same thing but the game is a web game(same stick hero)... but the help I need is that how do I calculate the distance between the first pillar(where the player is) and the center of next pillar where he needs to go. How do I do that... I iterated through single line of the game screen to get pixel values of pillar... but how do I get the pixel value where the pillar ends and the pixel value where the next pillar starts... Help me!
@THE16THPHANTOM
2 жыл бұрын
you can also go try hard mode and use AI... i'm gonna try this with AI for fun later if i get enough time(hate stopping in the middle of s**t).
@notexactlynikhil
4 жыл бұрын
If you can for SUBWAY SURFERS, believe me you're legit ; )
@Uploadnamess
3 жыл бұрын
So my question if you want make this apk and you will how you launch app without pc ?
@Artificial_Eagle
2 жыл бұрын
1 - Get the red position in the center 2 - Get the equation of a circle centered on the first black edge with a radius equal to the distance between this point and the previous red point 3 - Touch the screen until the line crosses the circle 4 - Get millions of view 5 - Get famous and money 6 - Get a wife and stop coding for the rest of your life
@ondodev1
3 жыл бұрын
U could of done a press of x time and then taken a screenshot straight away. From the line straight up u could of gotten the pixels per second (only difference i could think of that i would of tried)
@MakeDataUseful
4 жыл бұрын
Thanks for sharing, this is really awesome, I had no idea there was a thing called Android Debug Bridge and that you could control it with Python! I am excited to create some tutorials controlling android from Python! Subscribed.
@EmM-ko7mu
3 жыл бұрын
Cant you find the distance between the guys red head banner and the red dot? The RBG values of both will always be the same and always on the same x axis ?
@jamboy4308
2 жыл бұрын
At least someone is going after scammers. Not the phone company. Not the government. thank you!
@NirHL
2 жыл бұрын
Serious question: can someone explain to me what I need to look for and study to understand that well in computers?
@kullechannel2224
3 ай бұрын
is it possible to bot in bluestack emulator? i trying to do the tutorial but stuck "no device attached"
@madhusudhanan9278
4 жыл бұрын
is there a way to get the screen shot image directly into the numpy array instead of saving it to disk and the loading. it is time consuming that's y. I'm working on automation piano tiles so I saving to disk and loading is very time consuming. pls help. Thank you
@DrVektor
2 жыл бұрын
Which linux distro are you using and which desktop environment or theme. i like it minimal design.
@WhoTheDev
3 жыл бұрын
I'm thinking you could've used that not black to help find the start of a platform
@r00tku
4 жыл бұрын
You could use a distance multiplied by a certain coefficient as sleep time. That way, you could minimize the amount of time the bot waits on shorter distances.
@Hugos68
2 жыл бұрын
doesnt it move faster on longer sticks?
@Lindrios
2 жыл бұрын
Hey I'm super late to the game but a interested in trying this out! I was wondering what software is being used to link the phone to the PC like that?
@Menaceirl
4 жыл бұрын
instead of doing a percentage of the distance, you would have been better off subtracting a constant from distance. You were still missing long on the short ones because of this
@FarhanSwaggy
3 жыл бұрын
Elon musk should be hiring you by now just to help him out how he might be thinking of making the future to a Tulsa python cars🤣
@braydenadkins5785
2 жыл бұрын
Can someone explain to me how live modding works like how do these scripts effect the game live
@Willinat
3 жыл бұрын
who needs skills, when you can just tell the computer to have skills?
@donlew8222
2 жыл бұрын
I understood ZERO percent of this explanation.
@viertelasiat
4 жыл бұрын
@9:10 shouldn't line 44 technically set black=black to switch back?
@RexZShadow
4 жыл бұрын
Would t his be possible with an emulator like bluestack instead of a physical phone?
@skxjenje1072
Жыл бұрын
Are you a self taught programmer? How did you learn this?
@tanmaysinghal8370
4 жыл бұрын
is it possible to automate it somewhat like if the game is over or the screen is closed then the program should stop automatically
@Iwijn2000
4 жыл бұрын
a better way of approaching would be to just use the row with the red dot in. Just calculate the distance to the red dot.
@Lennings82
Жыл бұрын
guess you still running on a computer.. but how do you run this automation if you put it on an actual phone?
@tanmaysinghal8370
4 жыл бұрын
Why the transition[] contained only 3 values. I mean why did that loop ran only 3 times?
@undefinedchannel9916
3 жыл бұрын
transition[] contains the X coordinates of the end of the first black pillar, the start of the second black pillar and the end of the second black pillar. He calculates the width by (end of pillar - start of pillar)
@BlhJ400
3 жыл бұрын
Hey thanks and please can you do automation for android app using termux
@Ishaan_Garud
3 жыл бұрын
where to type the code and how to access the APPLICATION
@praveenkumarkothari4989
3 жыл бұрын
Do make the same for stick cricket...hopefully u will make it
@sanskardiwedi5444
3 жыл бұрын
I am getting an error whenever I am printing transitions it is giving only one value instead of three pls help to fix
@easternteasers1127
4 жыл бұрын
I don't understand why people use plain python to make games instead of game engine
Пікірлер: 469