Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Detecting game state from rendering calls within directx hook


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 roby65   Members   -  Reputation: 154

Like
0Likes
Like

Posted 06 January 2013 - 04:43 AM

Hi,

 

i'm working on a Smart Directx Hook that should render its things only when game is not in main menu / paused game / with console open, and i'm looking for some way to detect this knowing what directx functions are called.

My first idea was to get a crc from every loaded texture, and knowing what textures are drawed i could know what was the game state.

Only problem is that this method is not reliable: the game i hook ( Fallout : New Vegas / Fallout 3 ) it's a very modded game, and also the loading screens can be changed, and i want to be able to support mods without breaking the game state detection.

Are there other ways to accomplish this?

Google didn't help me

 

Roby



Sponsor:

#2 SuperVGA   Members   -  Reputation: 1118

Like
0Likes
Like

Posted 06 January 2013 - 05:06 AM

Hmm. Never did anything like this myself. Depending on the loaded stuff and the version of the application (defining offset in the heap to where the menu-related stuff is kept),
there's bound to be a byte that changes back and forth when you enter/exit the menu.
Try to grab a dump of the memory allocated for the application in and outside the menu several times to find it,
then look into means of accessing this place from your app.

But I've got no idea whether it would work. Just seems less hackish than looking at loaded textures...

#3 roby65   Members   -  Reputation: 154

Like
0Likes
Like

Posted 06 January 2013 - 06:12 AM

Hmm. Never did anything like this myself. Depending on the loaded stuff and the version of the application (defining offset in the heap to where the menu-related stuff is kept),
there's bound to be a byte that changes back and forth when you enter/exit the menu.
Try to grab a dump of the memory allocated for the application in and outside the menu several times to find it,
then look into means of accessing this place from your app.

But I've got no idea whether it would work. Just seems less hackish than looking at loaded textures...

This would be my 2nd idea, but it's not reliable too:

this game has a lot of versions and the user could be using one of these, so i should find the offset for every game version, and if the game gets a new update, this would break the state detection until i find the new offset.

Also the uk, eu and usa version has different offsets too, so for every version i should do the offset find 3 times.

 

Roby



#4 Mercurialol   Members   -  Reputation: 221

Like
0Likes
Like

Posted 06 January 2013 - 08:42 AM

Just wondering, why don't you solve this on the application level using state pattern?






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS