Live data from Hacker News

Super Hexagon Bot

crackedopenmind.com

11–20 of 31 posts

Re: Super Hexagon Bot

#12
For anyone who hasn't tried this game, it's pretty awesome! I was one of the top players on one of the level back then (http://www.twitch.tv/david_u/c/1985844).

I guess OP could have just done pattern recognition since there are not so many patterns in the end.

Also I'm impressed, here: https://www.youtube.com/watch?v=OyVcokAUj3E at 0:14 you can see that the screen is suddenly rotating. This is a super hard moment to pass and I can see that as a very disturbing thing for a bot as well.

Re: Super Hexagon Bot

#13
I'd love to see the code.

I attempted the same thing[1] but between the fact that I had no idea what I was doing and having to screencap every frame (instead of hooking directly into the game's buffer), it didn't work too well. I think at best it tended to last about 10 seconds on level 1.

[1] https://github.com/david-crespo/py-super-hexagon

Re: Super Hexagon Bot

#14
post #6

Ever since my 8-year old son beat the game multiple times on level 6, I have been working on getting there as well. The best I have made has been 19 seconds on level 6 - though I have beat the first five levels, level 6 is truly insane. Watching my son play is quite the experience. It seems my reflexes are not what they once were. It's an amazing game. I want to think that writing my own bot would count as beating th…

I got pretty good at Super Hexagon and can beat all 6 levels, but on their hard mode's I can't get very far on levels 5 & 6. I think my level 1 record is somewhere near 10 minutes now.

Considering by the 6 minute mark on level 1 you hit the ultimate difficulty that's pretty crazy.

My best time on that's only 300 some odd seconds, but my best time on level 6 is like 257 because that's basically all I play anymore.

Re: Super Hexagon Bot

#15
post #8

(I initially posted this on the Reddit thread yesterday, but I thought I'd repeat it here since there are many programmer types who might attempt this here.) From the article: > Of course, because we replaced the function with our own, we have to actually swap the buffers by explicitly calling the original glutSwapBuffer() function. I did this by undoing the hook, calling the original function and hooking it again. B…

Minihook is a great minimalistic opensource alternative if you cant pay 10000$ for Detours. http://www.codeproject.com/Articles/44326/MinHook-The-Minima...

Re: Super Hexagon Bot

#16

This is awesome. I used SimpleCV in Python to detect the walls, much like you did. But I used it to transform the screen to make the platforms fall vertically: https://github.com/shaunlebron/super-hexagon-unwrapper

An amazing concept, excellently executed. You just changed how I think about this game.

Re: Super Hexagon Bot

#17
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.

Re: Super Hexagon Bot

#18
post #8

(I initially posted this on the Reddit thread yesterday, but I thought I'd repeat it here since there are many programmer types who might attempt this here.) From the article: > Of course, because we replaced the function with our own, we have to actually swap the buffers by explicitly calling the original glutSwapBuffer() function. I did this by undoing the hook, calling the original function and hooking it again. B…

Minihook is a great minimalistic opensource alternative if you cant pay 10000$ for Detours. http://www.codeproject.com/Articles/44326/MinHook-The-Minima...

Detours really costs $10,000??? Unbelievable. I hadn't even looked into it. Thanks for the alternative suggestion!

Re: Super Hexagon Bot

#19
post #18

Earlier quoted context omitted.

Minihook is a great minimalistic opensource alternative if you cant pay 10000$ for Detours. http://www.codeproject.com/Articles/44326/MinHook-The-Minima...

Detours really costs $10,000??? Unbelievable. I hadn't even looked into it. Thanks for the alternative suggestion!

$9,999.95, apparently..

http://www.microsoftstore.com/store/msusa/en_US/pdp/Microsof...

Re: Super Hexagon Bot

#20
post #11

Oh man, I suck so badly playing this game, but I absolutely love the sound track: http://chipzel.co.uk/album/super-hexagon-ep

Fantastic, thanks!

I wonder, is there a name for this genre?

Post reply on HN