Tuesday, 27 March 2012

Spacebar 2000 cheat

If you haven't played Press The Spacebar 2000, you can find it here:
http://www.zimm-co.com/PressTheSpaceBar/pressthespacebar2000.html

Anyway, people from my school play that game loads. And the undisputed champion was my friend Josiah. But when he posted this on Facebook:

Then I knew I was going to have to beat him. Originally I tried to do it legit, but couldn't beat 40. Then I remembered C++'s keybd_event function. I opened up visual C++ and got to work straight away.

It worked, but it could be better. What if my one program opened up loads of other programs that spammed the space key for 5 seconds, then closed? I wrote one that opened a batch file, and that batch file opened up 10 programs that spammed the spacebar. I know it's not efficient, but I did write this in a matter of 20 minuets with the goal objective being to cheat the game.

The source code can be found here:
http://pastebin.com/6JUm0B44

P.S. Soon I will put up compiled full programs, for those who don't have compilers.

No comments:

Post a Comment