Open ciaoSora opened 6 years ago
By the way, in my first question, I mentioned that maybe it's the process of capturing a screenshot that caused the delay. However, I've read your Capture.cpp and found that I use the same way to capture a screen. Now I think maybe it's my algorithm of finding an enemy is slow. I cannot quite understand the 'findPlayer' function in your screenshot.cpp, please help me. Thank you :D
10ms is really negligible, the average human reaction time is ~200ms, I doubt that you'd notice 10ms :P.
For benchmarking in Release build you use timer.cpp i.e: Time t; t.timerStart(); //Code or Function() that you want to benchmark cout << "Benchmark: " << t.timerStop();
This should give you some information if you require it.
If I recall correctly findPlayer() works like this:
Thank you so much for such long reply :D. I will try to find out what's wrong with my program. But I am a little confused: 1) Your program first search for the health bar and then search for a player model. What if he is an enemy whom you haven't dealt damage to? In the game, health bar will appear only when you deal damage to an enemy. What makes me more confused is that in your demo video, the training bot is unhurt, but your aimbot can still work. 2) A screenshot takes 31 ms, which means it takes at least 31 ms to analyze a screenshot. Then your FPS must be 1000 / 31, that is about 33. That is so low. But in your demo video, it seems that the FPS is much more than 33.
Thank you again for your timely reply! I really appreciated it. :D
It's not unhurt, the aimbot only kicks in when the health bar is showing 100%. The video is just me making the first shot for the health bar to show and then letting the bot do it's work and I demonstrate the difference between two different aim speeds.
Idk what you're basing this on, but 33 actions PER SECOND is pretty good. Again this is not a memory aimbot so if you're going to base your opinion by comparing it to memory based models then that's not even fair. An external color aimbot will never be as good as a memory. In the video that I was showing the action per second was closer to 15-20 actions per second, being able to find an aim at a target 15x per second is much better than any human possible.
From experience I can also assure you that increasing the actions per second isn't helpful past a certain point because it is simply unnoticeable/too much (not to mention that it introduces new issues). I have implemented a version which hooks Present() to get a screenshot in ~3ms (1ms to intercept and get the screenshot buffer location and 2ms to memcpy it into a memory map for inter process communication) and the difference isn't noticeable. This method does however bypass OW's screenshot lock but again capturing in GDI is still good enough.
Thanks a lot! Your source code and your replies really help me a lot. Thank you.
Sorry to bother you again, but I've met a new problem. Somehow, what I am doing these days is detected by Blizd, and now I'm not allowed to get screenshot using GDI. You said that you have implemented a version which hooks Present() to get a screenshot and this method can bypass OW's screenshot lock. Could you please be more detailed? Is it about DirectX? Thank you. :D
If you're not familiar with injection, hooking and direct3d then I don't know how I can explain it to you sufficiently: Hooking is basically a form of function interception, in the case of dxgi games a screenshot is displayed when a function called Present() is called, for older direct3d versions EndScene() is used; thus we need to intercept Present().
I would recommend reading about: injection, hooking and basics of Direct3D; my explanation barely covers everything that you need to do and I left out a lot of detail which would have been pointless anyway. Good luck
Oh, thank you so much! Actually, I'm pretty new to windows programming, and I have only learnt a little about DirectX before. It seems that I have a lot of things to learn. Thank you, really.
Hi, jpxue, are you still working on it? Recently I've written a widowmaker aimbot, but it just cannot work very well. In my aimbot, when I click the midButton, it will automatically locate an enemy. Here's some of my problems: 1) After I click the midButton, there's a delay of about 10 ms I think, before widowmaker shoots. I think it's because the process of capturing a screenshot is slow. But in your demo video, your bot works pretty well. 2) The red line around an enemy are not the only thing that is red, so my bot cannot always choose the right target. Can we get in contact? Thanks :D