Gideon
Gideon

Reputation: 2014

Reading memory from a process (game in this case)

I'm making a autoclicker atm to get back into C# before my school starts again. I've been playing with php as an intern the last 5 months, when we get back to school php will be gone and C# will come looking around the corner.

I have played with C# for a long time, just some fun things whenever I get an idea, nothing special. Now I was making a autoclicker with record function so I could automate some things in a game, but I wanna take it a step further, memory reading!

Untill right now I found it so hard to find some decent info on it (dont know exactly where to look for) that im stuck. I want to make something that you can compare to an aimbot, but nothing commercial or anything, just want to experiment. I want to know the location of lets say ghosts from pacman, or the bal in pinball, or even airplanes in a flying game.

How do I start with this? I've read some things about how memory works and some functions to actually get it. But I dont know how to FIND the addresses. Also I dont know how to use them in a if statement for example.

Can someone point me in the right direction here?

Upvotes: 6

Views: 31220

Answers (3)

PeterSvP
PeterSvP

Reputation: 2046

Your best bet for writing trainers is to go native directly. Learn some C and C++ then use ReadProcessMemory. Working with native pointers in C# even in unsafe mode is terribly hard and ugly. Working with P/Invoke is not that terrible but for your case the only cool thing C# is giving to you is WinForms. Managed C++ is the best option if you need WinForms and native pointers in other processes in the same place :)

Upvotes: 0

Bawss
Bawss

Reputation: 38

I suggest you check (C#)ReadProcessMemory out.

Upvotes: 1

kev
kev

Reputation: 1124

Cheat Engine can help you find the memory adresses you need, although it is a rather tedious task. It also lets you change stuff if you want to experiment. There are also Tutorials on Youtube and on the CheatEngine forum

Upvotes: 1

Related Questions