Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Is the player dead? #27

Answered by Folleach
KirillMakarichev asked this question in Q&A
Discussion options

Hey, using your api, how can I make sure whether the player has died during the session?

You must be logged in to vote

Note: work with process memory isn't priority for the library.

But! You can still use a small wrapper over the win api
As an idea. You could look at the position, if it resets to zero at the moment - it means death

GameProcess process = new GameProcess();
process.Initialize(Access.PROCESS_VM_OPERATION | Access.PROCESS_VM_READ | Access.PROCESS_VM_WRITE);
IntPtr Player = process.Read<IntPtr>(process.GetModule("GeometryDash.exe"), new[] { 0x003222D0, 0x164, 0x224, 0x4E8, 0xB4 });
int AddressPositionX = IntPtr.Add(Player, 0x67C).ToInt32();
while (true)
{
 float posX = process.Read<float>(AddressPositionX);
 // check previous value of posX here
 Console.WriteLine($"Position X: {posX}");...

Replies: 2 comments 1 reply

Comment options

Note: work with process memory isn't priority for the library.

But! You can still use a small wrapper over the win api
As an idea. You could look at the position, if it resets to zero at the moment - it means death

GameProcess process = new GameProcess();
process.Initialize(Access.PROCESS_VM_OPERATION | Access.PROCESS_VM_READ | Access.PROCESS_VM_WRITE);
IntPtr Player = process.Read<IntPtr>(process.GetModule("GeometryDash.exe"), new[] { 0x003222D0, 0x164, 0x224, 0x4E8, 0xB4 });
int AddressPositionX = IntPtr.Add(Player, 0x67C).ToInt32();
while (true)
{
 float posX = process.Read<float>(AddressPositionX);
 // check previous value of posX here
 Console.WriteLine($"Position X: {posX}");
 Thread.Sleep(16);
}
You must be logged in to vote
1 reply
Comment options

I've used a cheat engine for finding an sequence of offsets 0x003222D0, 0x164, 0x224, 0x4E8, 0xB4, 0x67C
There is a problem when game will be updated: the offsets may not be relevant, which is why they will have to be found again.

I couldn't find a more simple way to keep the offsets up to date, so this direction of the library has become a non-priority

Answer selected by Folleach
Comment options

Thank you for responding!

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /