How to analyze game memory in general

Hi Viir,

Thanks for sharing your great works. As I go through your project, it makes me remember writing the garbage collection code in c++ several years agao.

My question is this project based on how the EVE client stored the information in memory. But how long does it take you to figure all those memory map out and which tools are you using for the tasks? And how about other games if we go into interface reading route as every game have different UI components in memory, wouldn’t it take months to figure those out? Do you have some tutorial about this for general games.


A large part happened in 2013 and 2014, and I don’t remember how much time that took. I first explored a more general solution for memory reading, going for pointers in general and drawing from the information of the Windows memory management to read the structures. The breakthrough came only after switching to a more specialized approach based on the structures given by CPython. I probably spent more than 100 hours on the memory reading in those years.

Back then, identifying pointers was more difficult because the EVE Online client only used 32-bit addresses. For 64-bit game clients, we have it easier because it is much less likely to have a false positive.

In December and January, I adapted the memory reading for the 64-bit EVE Online client. It looks like I spent about 55 hours on that adaption. However, that included also improvements in the overall design of the interface to account for what I learned in the last five years.

About the tools: The first step is to get the samples from the game client process:
That part applies as long as you want to develop memory reading, and that tool works with game clients as long as they are using 64-bit addresses.
Since the samples combine screenshots and memory contents, we can use them as input for training the algorithms to extract the interesting parts in production.

Other tools depend on the specific game.

Depends on the game. The easiest way to do interface reading sometimes does not involve memory reading at all. Whether or not to use memory reading also depends a bit on your overall strategy or what range of clients for that game you want to support.

The memory management in the EVE Online client works in a way that makes it easier to read from compared to other games. Consider, for example, how seldom we see locations of memory blocks for live objects change. Compare that to compacting heaps. In general, more optimization in memory management leads to more complexity when extracting relevant information.

The bot for Elvenar is an example where image processing worked well and required less effort than memory reading.

Another example: In Tribal Wars 2, we use an interface to the Javascript engine to read from the game and also to send inputs. We send javascript snippets to execute in the context of the page, and via return values, we can get information out. This approach means we never see the complexity of how the information is mapped into the flat memory somewhere in a heap.

For games in general, the tutorial is this: Step one: Choose a game you want to start with. Step two: Get a tutorial for that specific game.

Thanks for the response. There is a lot to learn on the way. I made several ScreenShot based bot from 2014 of pokers and simple screen reader of EVE of 2018 by OCR. I see there is a future which based on AI recogonize the envirnment of the games which we can totally based on that information to make the bot feel the ENV just like human did. Any AI tech should we learn for this part since AI is a very big area which my PHD friends each have a specific topics to learn from. Any books recommended for AI topics?

I do not remember any book on AI I could recommend. I am leaning more to (inter)action in this domain; other people might find it easier to bring patience for a book.