Stream stats

  • Thread starter Thread starter Michael C
  • Start date Start date
M

Michael C

I've heard it's possible to extract information from a game as it's running.
For example some people extract the RPM of a car and have a real tacho
connected to their PC, or just log certain information to a file. How is
this done? I've tried google but can't find anything because I'm not sure
what search terms to use. I've posted this to vb6 and c# groups as I'm not
fussed which I use.

Thanks,
Michael
 
I've heard it's possible to extract information from a game as it's
running. For example some people extract the RPM of a car and have a real
tacho connected to their PC, or just log certain information to a file.
How is this done? I've tried google but can't find anything because I'm
not sure what search terms to use. I've posted this to vb6 and c# groups
as I'm not fussed which I use.

Your question is too vague.
 
Jeff Johnson said:
Your question is too vague.

What's vague? I have a game running, GTR2, and would like to write some code
to obtain data, such as RPM. I believe there is a fairly standard method of
doing this but can't find info on it.
 
Michael C said:
What's vague? I have a game running, GTR2, and would like to write some
code to obtain data, such as RPM. I believe there is a fairly standard
method of doing this but can't find info on it.

There is not a standard way of doing it, and for sure there's nothing in the
C# language that provides a means for doing it, nor VB.

If you want to extract runtime data from a game, you need to either reverse
engineer the game or take advantage of some public (or in some cases,
pseudo-public) API that the game author provides. Neither this newsgroup
(m.p.d.csharp) nor the VB newsgroup are appropriate places for learning
about those methods.

Pete
 
What's vague? I have a game running, GTR2, and would like to write some
code to obtain data, such as RPM. I believe there is a fairly standard
method of doing this but can't find info on it.

Well, from your original post it appeared that you were talking about a game
first and then suddenly talking about extracting information from a car. It
was not obvious to me that you were talking about a car in a game.
Regardless, Pete's reply is the definitive answer: this isn't as easy as you
think it is.
 
What's vague? I have a game running, GTR2, and would like to write some code
to obtain data, such as RPM. I believe there is a fairly standard method of
doing this but can't find info on it.
Vague is saying "I've heard it's possible to extract information from a
game as it's running." ...with no mention of the game, platform, etc.

I've heard of this game, it has some sort of telemetry system that feeds
out to external sources for race performance analysis, but that is by no
means usual in games (even games allowing user scripting usually limit
reading variables to the scripting system itself with no external
output).

Considering it is a specific game/system you'd be better off asking in
the official game forum at
http://www.bhmotorsports.com/board/viewforum.php?f=60

I spotted a couple of threads on it in there including a beginners guide
to using the telemetry system, you may be able to extrapolate from that
how it is exposing the info and if it is in a usable form for your own
program.
 
Peter Duniho said:
If you want to extract runtime data from a game, you need to either
reverse engineer the game or take advantage of some public (or in some
cases, pseudo-public) API that the game author provides.

From what I understand that is not true. Games have a standard interface
which allows any program to extract certain information from any (or most)
games while they are running. Most games are using directX which provides a
good degree of standardisation. Certainly it's possible to purchase a device
that plugs into USB and drives a standard taco and works with most games.
Neither this newsgroup (m.p.d.csharp) nor the VB newsgroup are appropriate
places for learning about those methods.

I've also been told that there are downloads for vb6 that can do exactly
what I want to do and without nuch difficulty. I'll try the gaming forum
suggested by alfie.

Michael
 
Michael C said:
From what I understand that is not true.

Well, no offense intended but you simply do not understand then.
Games have a standard interface which allows any program to extract
certain information from any (or most) games while they are running.

They absolutely do not. Some games publish such an API (and it appears that
in this case, the game you're interested in may well have that), but there
is no standard for such an interface, and most games have no such interface.
Most games are using directX which provides a good degree of
standardisation.

DirectX is an operating system API that presents a "degree of
standardisation" *to* the game, in order to control things like the
graphical output, sound output, user input, online player connections, music
output, video playback, and maybe a few other things I'm forgetting. It has
*zero* to do with what API the game itself exposes, if any.
Certainly it's possible to purchase a device that plugs into USB and
drives a standard taco and works with most games.

That's right. That's because most games use the DirectInput API, published
by the Windows, to obtain access to a USB controller. That has *nothing* to
do with whether a third party can extract information *from* the game
itself. It relates only to how information is provided *to* the game.
I've also been told that there are downloads for vb6 that can do exactly
what I want to do and without nuch difficulty. I'll try the gaming forum
suggested by alfie.

Good...I'm glad there's an alternative forum in which you have a better
likelihood of getting the information you want. Hopefully, they will be
able to answer your questions.

Pete
 
Peter Duniho said:
DirectX is an operating system API that presents a "degree of
standardisation" *to* the game, in order to control things like the
graphical output, sound output, user input, online player connections,
music output, video playback, and maybe a few other things I'm forgetting.
It has *zero* to do with what API the game itself exposes, if any.

Maybe it's possible to hook these calls.
That's right. That's because most games use the DirectInput API,
published by the Windows, to obtain access to a USB controller. That has
*nothing* to do with whether a third party can extract information *from*
the game itself. It relates only to how information is provided *to* the
game.

Um, no. The drivers for the taco apparently extract information from the
game, the game does not detect this device.

Michael
 
Michael C said:
Maybe it's possible to hook these calls.

It is possible to "hook" any OS call, given sufficiently elevated privileges
and access to the computer. However, none of the DirectX calls are involved
with (for example) the tachometer output for the game. Hooking those calls
in no way helps you toward your goal of accessing the underlying game data.
Um, no. The drivers for the taco apparently extract information from the
game, the game does not detect this device.

Sorry, I misunderstood your original statement. I thought you were talking
about a game input device. I assume by "taco" you mean a "tachometer", and
not a folded tortilla food item...I completely glossed over that earlier.
My mistake.

Still, as far as your claim that "it's possible to purchase a device that
plugs into USB and drives a standard taco and works with most game"
goes...that may be true, but if it is, the company that makes the device has
done all of the work to reverse engineer the games it works with (or takes
advantage of published APIs, for games that do expose their internals that
way). There is no standard API.

If you want to claim that there is, simply provide a reference to the API.
Saying that it exists over and over doesn't get you any closer to solving
your problem, and the longer you keep believing that there is a standard API
to do what you want, the longer it will take you to get around to finding
out how it's *really* done.

In any case, this has zero to do with C#, and only passing relevance to
Visual Basic (assuming, of course, you can find VB libraries that do what
you want...if you can't, then it has nothing to do with VB at all either).
Since I'm here to discuss C#, at this point I will leave you to your
beliefs, correct or not.

Pete
 
Maybe it's possible to hook these calls.

Michael, Peter's spot on with this. Most games don't expose any public
interfaces to allow you to tap into the game internals and read them out
to another app or device.

Whilst there are methods to hook DX calls out to the hardware this is
usually used to create a layer to convert for instance DX9 calls to DX8
calls, allowing people with older hardware to run newer games.

It cannot help expose internal data if that data has no public
interface, think of it like an AX/class object, you only get to use
those methods publically exposed by the object and for most games there
is little reason for the developer to expose internal data states.

Racing and flying sim games are more likely to have such public
interfaces because of the non-typical control/output devices that can be
used with them, for instance steering wheel and dashboard kit.
Um, no. The drivers for the taco apparently extract information from the
game, the game does not detect this device.

GTR2 specifically exposes the internal info to an external app for
real-time usage, and I'm assuming if you can find out enough about how
it's doing that you can tap it for your own purposes.
 
Peter Duniho said:
Sorry, I misunderstood your original statement. I thought you were
talking about a game input device. I assume by "taco" you mean a
"tachometer", and not a folded tortilla food item...I completely glossed
over that earlier. My mistake.

Still, as far as your claim that "it's possible to purchase a device that
plugs into USB and drives a standard taco and works with most game"
goes...that may be true, but if it is, the company that makes the device
has done all of the work to reverse engineer the games it works with (or
takes advantage of published APIs, for games that do expose their
internals that way). There is no standard API.

If you want to claim that there is, simply provide a reference to the API.
Saying that it exists over and over doesn't get you any closer to solving
your problem, and the longer you keep believing that there is a standard
API to do what you want, the longer it will take you to get around to
finding out how it's *really* done.

In any case, this has zero to do with C#, and only passing relevance to
Visual Basic (assuming, of course, you can find VB libraries that do what
you want...if you can't, then it has nothing to do with VB at all either).
Since I'm here to discuss C#, at this point I will leave you to your
beliefs, correct or not.

It would have been a lot easier if you just said you didn't know how to do
it.

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top