Let's say I write a game in C++ and part of the game tracks the location of every player in memory.
For example some vector of Positions:
struct Position {
float x;
float y;
}
I have two questions.
1. My assumption is that people develop hacking tools by observing the game memory and being able to find and reverse-engineer the meaning of the values in memory. Thus, games that hold the full state in memory (as opposed to requiring some server to tell you info only when it's relevant) are significantly easier to hack. Is that correct?
2. If the above is right, could you combat this by basically patching every week shuffling your code around in ways that are logically equivalent, but yield different data structures in memory?
Like, just reorder the fields in your struct to:
struct Position {
float y;
float x;
}