4 ms·
For anyone interested in alternate bot approaches: While the author made this "pixel bot" to pair their Super Hexagon with ambitions to learn OpenCV, pixel bot
by nerdy 12y ago
For anyone interested in alternate bot approaches:
While the author made this "pixel bot" to pair their Super Hexagon with ambitions to learn OpenCV, pixel bots are almost always inferior to memory-based bots. As mentioned elsewhere in these comments, code injection should use caves and jumps, not overwrite existing code.
With a memory-based bot you often do not even need to write to the game's memory. You can use the ReadProcessMemory API call for data gathering and perform inputs with SendInput (emulate keyboard input with LLKHF_INJECTED set) or PostMessage (no LLKHF_INJECTED, also works in backgrounded windows).
The disadvantage to memory bots is that they're often more complicated at scale (beyond the point where a pixel bot would likely fail entirely), particularly with games which are updated. In cases where a game client is updated, signatures similar to virus definitions can be provided to find the particular memory address of a sought value regardless of version. By scanning the application's source code for a unique bytecode pattern known to contain the target address, you can then extract the address and read the value. This is commonly known as signature or pattern scanning.
There is another variant of bots for client/server programs where a "headless" (no display) client can interact with the server via network communication alone. Not as much fun to watch but also a very effective way of interacting with games, though it does not apply to standalone clients like this one.
- jwcrux 12y agoInteresting. Do you have any more resources about how these bots are made?
- nerdy 12y agoSee my reply above
- marcosmlopes 12y agoInteresting. Do you have any more resources about how these bots are made? ²
- nerdy 12y agoI don't have any resources in particular but I've personally made them for years. In general you read memory and take action (via keyboard input) based upon what you read from memory. For example in a game where you fish, you would wait until a fish is on hook by watching the representative value in memory and pressing a key to catch a fish when that value indicates you have a fish on-hook. In Super Hexagon you would watch the values indicating where walls were placed, which is likely an array of enumerable values indicating a shape (each shape has at least one opening). So a 1 might indicate a wall only at north, a 3 might indicate every odd side of the hexagon is a wall which must be avoided, etc. Finding values is obviously easier when the value is displayed on-screen, like ammo in first-person shooters. It takes some time to become familiar with exploring memory like this and you certainly wouldn't want to write your own memory scanning primitives to do it, start with a tool like Cheat Engine (http://www.cheatengine.org/ http://www.cheatengine.org/), ArtMoney (http://www.artmoney.ru/ http://www.artmoney.ru/), or one of the many other memory editors available (https://www.google.com/search?q=memory+editor https://www.google.com/search?q=memory+editor). If you'd like more details please be specific about what you'd like explained!
- marcosmlopes 12y agoThank you!