-
Notifications
You must be signed in to change notification settings - Fork 174
Pointers
Simply put, Pointers are a type of variable that store a memory address in them.
Normal variables can be different types, like int (integers) and floats (decimals). They store values, like a player's HP amount or how much ammo they have.
Pointers' purpose is to store a memory address of a variable (or more, but let's keep it simple) so you can always reference a particular variable during a program's (or a pointer's) lifetime.
You can find a more in-depth explanation about pointers here.
Games are complex programs, most of them will never store a player's HP amount in a simple variable that always has the same address. Instead, those variables are usually allocated/created during runtime in structures/classes that define a Player entity.
This results in the address for Player's HP to be random every time you restart the game, which is where Pointers come in clutch as you can use them to point to addresses allocated during runtime and find the variables you're looking for every time, even after restarting the game.
There are a lot of ways where pointers' address tracing solves this issue, but a common one is by finding a stable pointer chain (which can be composed from just one pointer or multiple nested pointers) that persists on relaunch which points to your desired value.
Going in-depth about how they work is a bit out of scope for this quick introduction so if you want to dive into how you can use them, you can check out this Cheat Engine tutorial. Even though we don't have CE's pointer scanner interface, most of the principles there apply here as well.
We do have an experimental scanner that has the instructions split off into its own tutorial page.