Basic example of Windows game hacking in C++
C++ Hack for simple game (however unfinished), made in C++ with Code::Blocks IDE, for fun and somewhat profit.
Download it for free, exactly this build: portableapps.com
Turns out that bonuses don't have static addresses, and Cheat Engine cannot find pointers to them (or maybe i just don't know how to find them really).
FIXED - The thing is, these pointers are far away from ImageBase
and so i had to turn up the Maximum Offset Value
in pointer search window, to find anything. Put like 9999999
or something :v.
It's a bad idea to draw text like i am doing it here. Good way to do this, should be to find what library draw's text ingame (like help menu), and use direct calls to that instead.
Everytime you move cursor out of the window, it pauses the game automatically. I was not able to find address of pause screen status, so you have to run the hack, when on pause screen in game. Also GetKeyState
checks key status, even when not focused on window (however using GetFocus with GetKeyState
should work fine).
- Whole
lbreakout-trainer
is a Code::Blocks project (If compiling by hand, readResources: Code::Blocks SetTextColor error
) lbreakout2.CT
- Cheat Engine 7.0 file with my findings, however things likerainbow
andblue ball
are dynamically allocated, without pointers
- Bonuses are stored as 4 byte bool's
- To activate bonus with memory, you need to write
1
to two addresses - You can find addresses of Bonuses by searching for
0
when they are not active, and1
when they are active - Most bonuses use two bool's, while other's (like rainbow) even four bool's
- Offset between bonuses is around 0x1C (not sure)
- Life's are updated on death
- There can be more life's than shown on display
- Default paddle size is
72
- Maximum paddle size is
554
- Paddle has two values: physical and view
- Physical represents area on which the ball can bounce
- View represents drawn paddle on screen, so you can see how big it is
- View pointer is static:
"lbreakout2.exe"+0006C674 + 0x20