It is been a while that me and my co-workers at Atra Vision are competing on this "Lumberjack" game on telegram! For a long time, I had the best score until 2 geeks (Zohre and Niloufar) got some untouchable scores that took lots of effort for me to beat it (Currently I have the first rank with 413 scores!!).
Although I have the first position in the ranking now, but I still feel the risk that some day I wake up and see someone just took my place! So what to do? Play until death!? No, it's time to cheat! An open-source cheating for beating!
I decided to write a simple program capable of beating me and any other geek in the future! So just like the game bot idea of telegram, I developed a player bot called Lumberjack Racer!!
You can download the latest Lumber Racer version from here.
Having no knowledge about computer vision algorithms, it took about 4 hours to write such program, plus 5 hours for refactoring and further optimizations! And now, it works like a charm! In case you are enthusiastic to see the source code, I've just put the source code on my GitHub. I'm pretty sure it is not a final and well-formed code, so I would be happy if you fork and improve it. It still needs lots of refactoring, but I just leave it in its current state.
I hope this piece of code wouldn't become a field of programming contest again, I wont participate in that a contest anymore!
BTW, I think the source code is a good starter kit my software architecture workshops. The interesting part of current design is this interface:
public interface ILumberjackWorld { Image ViewCamera(); void SendKeyboardCommand(KeyCommand command); }
As you see, there is an abstraction defined to represent the world of Lumberjack game. For me, as a programmer, a Lumberjack game is nothing more than these:
- ViewCamera() : To get some specific region of monitor that I should watch for the tree.
- SendKeyboardCommand() : To send 2 keyboard commands to the game: Right Arrow and Left Arrow
You can use this representation of the game to apply your own algorithms. A good practice to improve the architecture of this code is to use MEF for plugging new algorithms.
BTW, you can check the result on YouTube:
UPDATE:
If you have questions about the code, please ask in StackOverflow and then let me know.
it's trojan you son of the bitch
Are you serious!!? Which file!? The source code is available on Github!!!
It's a Trojan? Can't stop laughing.... XD
Great work.
Appreciated
I mean.. I´ve red the source code. No spyware in it. I promise that, and sorry for my bad English.
could you make it available on mac??
@Samuel Thank you there...
@Peter It's a good idea... I'm wondering to migrate it to .net core so it could be available on Mac and Linux too...
Great !Nice job Bro
Hi Mehran, Thats Great, which parameter can I change to gain more than 400 scores?!! I download the source code.
@Fredd you just need to change the 400 limitation in the source code. Please let me know if you couldn't find it.
Hi Mehran Great Work 🙂
As I have no knowledge about computer and my English is not good enough to understand how it works , would you please tell me what do I have to do step by step to beat my friends scores? thank you and sorry for my bad english 🙂
@Mohammad Hassan, just download the LumberRacer.exe file from here:
https://github.com/mehrandvd/LumberRacer/releases/tag/v1.1
From then, everything would be straightforward, please let me know if need more help
thanks
I downloaded the file and started the program but it doesn't work well
I move the mouse on the game until the screen becomes green ( after adjusting the score on 400 and I really like to know how to increase it more than 400 🙂 ) then click on the game and press space , the games starts but it fails after 6 or 8 scores or some scores like this and it doesn't reach 100 for example ( I press the space some more times to retry but it does as what I explained ) and after some tries it says congratulations you reached the score 400 😐 ( it think it pluses even time's try to the last time try and it reaches 400 😐 )
again , sorry for my weak English and thank you for trying to solve my problem 🙂
hey,
nice job dude,
have a look at this video:
https://youtu.be/HEb2zEazb_E
cheers.
hey,
nice job dude,
have a look at this video:
https://youtu.be/HEb2zEazb_E
cheers.
P.S. i can't post this
I think you installed the old version. In the new version you don't need to press space anymore, and it works like a charm.
Just one advice, try to fit window in a way that lumberjack's bread be visible in the bottom of the window.
it worked , thanks 🙂
hi i'd like to know how to reach the score more than 400??? how can i change it? thanks
@Mahyar, just fork on github and change the code 😉
code has some issues for compiling,why not just release a a compiled version with a config file ,do you really think it worth the effort to compile for a bot like this ?!?
compiling is fine there was an issue with my mono
Mehran, please ask me in facebook) I wrote you
Mehran, please answer me in facebook) I wrote you
Hi there... I didn't find anything on my Facebook!
Are you kidding me? That doesn't work at all . I did waht you wrote but it scores only 6 or 8 and will lose!!
I think you've downloaded the old version.
I tried both . but I lose with 6-7 scores .
Can you send me a picture of your application when you loose?
https://postimg.org/image/ov83yiv4x/
here you go.
Damet garm dadash????
I suggest you to adjust the camera just as described in the application. The bottom edge a little lower than the breed. And the top edge a litter lower than time progress bar.
salam
lotfan daghighan begin chejuri un mahdudiate requested score ra bardarim
manun
GG I haxed the score to 666 with this 😛
salam dadash
man barnama ro run kardam vali in error ro mide:
http://uupload.ir/files/b9ep_capture.jpg
I think you're using old .net, it requires .net 4.6
merci. dirooz az site haye khareji tahghigh kardam didam be khatere .net hast. 4. ro zadam run shod.
vali man har kari mikonam barname khob tanzim nemishe ro bazi. yani doorbin mishnase ha va sabz mishe vali faghat 10 ta score miare.
chejuri bayad tanzim konam?
I found out how to change the limit, but how do i recompile it into a .exe file?
salam mersi az narm afzareton... vali to system man asan nemikhone 😐 chikar konm? asan narm afzar bala nemiad 🙁
Good Job!
Hello! I downloaded version 1.1 but only managed to make 6 to 8 points, I do exactly what it says in the video and I have tried more than 25 times and still can not make it work!
Can you help me with this?
Make sure your camera view is at a good view point. It shouldn't contain the score bar at the top.
I would be more than happy if your sir tried to make another bot for a telegram game named "Math Battle".
Thankful to all your efforts in making this bot .☺️☺️☺️
Thank you... but I wrote this just for fun!!!
its not work . its just get 6 or 8 score when i run it.i do everything that you say in comments.
can you get it to me if i give you my game link???
Hi mehran can u say exactly how to compile the version that we edited for no limitation??
Just hit F5!!! But you need .net framework 4.6..
I'm a medical geneticist so I really don't know about programming, but anyway I could make an account on Github and HARDLY found the 400 value and changed it to somewhat more, but the problem is that now I don't know how can I have a functional .EXE file out of it. beating some of my friends is a matter of life and death. thanks ...
Drop me a line on Facebook or twitter...
Hi, what language is this and what program do we need to compile it?
It is written in C# and you need Visual Studio 2015 to compile it. But the compiled version is available in GitHub.
sala.in vase man nemidonam chera ejra nemishe?
Nice job bro! I did it!
hi mehran tnx 4 your program how can i reach the score more than 400??? plz tell me step by step.
can u share the program link with out limitation? i think is so easy for u.please answear me.
ITS CRASHING ON FIRST START!!! WIN 7 64BIT
WHY?
You can cheat the stats too btw:
1. Start a game
2. rightclick the game and go to inspect element
3. go to console
4. write
gameeUI.updateScore(9999999)
gameeUI.gameOver()
That's interesting... BTW, my main goal was to teach how can people write a bot for a game 😉
Hi.how can I change in source code in order to give more than 400 scores,please help me to change and after that make exe file same as you.
thanks a lot
Just tryed the code but it fails after 10 hit.
This is the image: http://imgur.com/a/hKg92
What am I doing wrong?
Thanks a lot!
Hi, great job on making this bot! I'm interested to learn how to read your code structure (since I don't have C# experience), how to build it and the algorithm behind this bot. Can you guide me through it, even simply?
Could you kindly response through email I provided here or maybe just reply here so every one can see 🙂 Thanks
how can i change the limit from 400 to an upper number?
dadash mehran chera bishtar az 400ta nemire
i was wondering how may i run the Lumberjack Racer!! on the mac?
is there any other bots that i could use on mac?
thanks
Sorry, unfortunately there is no version available for Mac
hi mehran can you pleeeease i cant get over 400 scores please help me step by step i dont know too much about these stuff thhanks a lot
hi there
why don't you release a version without 400 limitation?
You can easily remove the limitation by forking it on GitHub 😉
Hi, Dear Mehran.
I changed the limitation but still in the app request code limited on 400 and I can't increase more than 400.
I think you changed a wrong place.. Look more places...
Dear Mehran
It only works with 150 ms refreshing rate in my system, i really have no idea what is wrong.
i don't know where is the origin of delay
Hey Mehran
I wasn't wondering if u could help me with this...
I've really tried many times , changing camera postion but still my point won't go further than 10 or so.
This is Screenshot link:
http://tinypic.com/r/atpvyo/9
Thank you 🙂
I was wondering..
CAN'T EDIT -___-
Hey! I forked it on gib (bokifide). And I'm unsure how to go about it from there.. I downloaded the .exe but I can't edit the code on that so I downloaded the other set of files with .cs and downloade visio, changed the code, but I have no idea how to turn that into a functioning program from there... any help would be appreciated 🙂
nice try friend and cool idea
I liked that
Sono analfabeta sulla programmazione.
Mi aiuti a togliere il limite dei 400!??
Great work.
Appreciated
please, I bag you, explain to me how to use this code) I am very far from programming but I need this highscore
Hi there,
I tried to change the 400 number in source code in order to remove the limits , but the only thing Ive got was bunch of errors !!!
I need your help ham vatan 🙂
Hello...
I know c++ and I use visiual studio code however I failed to compile your code after I changed to max score. There is no c# extension on visual studio and I failed to set it up. I have been working on it for some hours and I am here to ask you could you please send me .exe file? (;-;)
Or can you publish it, because in github, the .exe version is the one with 400 limit.
And thank you for the great program, It was fun!