PDA

View Full Version : Statistics Capture Program for Games



Dragon-Ion
12-04-2010, 05:31 PM
First off, let me apologise for this thread. I realize this might not be the right place but it is the best place for the question I have.

How would I go about creating a program that will gather statistical information on a player as he/she plays a LAN match in a game. The game referred to is any existing game.

I realize that not all games are made the same so if I wanted to support ten games with the program, I would have to implement the stat capture ten different times. This is not much of a problem. For the sake of simplicity, let?s use DotA as the reference game (I know, not technically a game, but let?s not argue semantics). The data I would like to gather is simple things like which player you killed the most, who killed you the most, things like that.

So, if anyone could point me in the right direction, or tell me how I should do this, it would be appreciated. However, if you are planning to tell me that this is impossible or that there is a program that can do this, don?t waste your time.

I am coding in C#, so please keep the code in that language if you can.

Any help will be great.

Fengol
12-04-2010, 05:59 PM
I don't want to say it's impossible but those kinds of stats you would have to be able to extract from the game and there's no common format or API for that nor do I think games expose that kind of data. You would have to hack the game files, and I'm sure if you look around the modding communities you'll find some information about how to extract various pieces of data.

Your second hurdle is using C# because most games aren't written on the .NET platform and you will have you have to hook into a COM library to get the data you need (just like working with the native Windows API) or hack the binary/encoded file.

So my 2 suggestions are: 1) Find a modding community focusing on the game you want to support and 2) learn the InterOp between managed and unmanaged code.

DOTA shouldn't be too difficult a starting point because it's heavily modded already. I will think you will encounter problems using .NET though although it is doable.

dislekcia
12-04-2010, 08:06 PM
Is there any reason you can't just crunch through replays and grab stats from them?

Dragon-Ion
13-04-2010, 07:11 AM
@Fengol: will take a look, thanx.
@dislekcia: not all games support replays, and it would iritate the user.

herman.tulleken
13-04-2010, 09:57 AM
Just out of curiosity, what do you want the data for?

Dragon-Ion
13-04-2010, 11:22 AM
A app I'm trying to code for large LANs. Nothing like StrongDC though

dislekcia
13-04-2010, 12:12 PM
A app I'm trying to code for large LANs. Nothing like StrongDC though

Yes, but what do you want to DO with the stats you're gathering?

Support competitions? E-peen? Bragging rights? What?

Dragon-Ion
13-04-2010, 04:04 PM
Oh. Bragging rights to begin with. If it actually works, it might evolve at a later stage.