leighmacdonald / gbans

gbans is a centralized game community platform with support for global bans. It currently supports Team Fortress 2
MIT License
41 stars 13 forks source link

Parse Demos For Stats #469

Open leighmacdonald opened 2 months ago

leighmacdonald commented 2 months ago

Instead of using sourcemod plugins and log parsers, I want to parse STV demos directly. Pulling out many more stats and fixing some bugs with the current system.

The work for this is being done @ https://github.com/leighmacdonald/tf2_demostats

This project will implement a simple HTTP api that will allow the upload of a demo and return the json formatted parsed stats from it.

This api may eventually be opened up for the publics use as well, possibly paid.

unclamped commented 1 month ago

@leighmacdonald I'm not sure if I got your idea correctly, but could it be this what you are looking for? https://github.com/MegaAntiCheat/demolyzer

leighmacdonald commented 1 month ago

@unclamped Yeah i'm aware of that project already and probably makes more sense for their project to do it in python if they are trying to (eventually...) feed it into some ml models.

Currently the project im working on that I link to does a very similar thing, implementing the parsing using the same underlying rust library, but it also exposes it over a HTTP API service so i don't really gain anything by using a python interface. Additionally i want to keep the CPU usage as low as possible as we process a lot of demos, and i want to eventually open it up for the public to use.

Gcommer commented 3 weeks ago

Additionally i want to keep the CPU usage as low as possible as we process a lot of demos, and i want to eventually open it up for the public to use.

It's not upstreamed as its still pretty hacky, but I was able to get a pretty huge (~10x) speedup on some custom tf2-demo-parser analyzers by being very careful about handling entity props: https://github.com/demostf/parser/compare/master...Gcommer:parser:perf

I'd be down to contribute some profiling work if this is a pain point for you.

leighmacdonald commented 2 weeks ago

Sounds good, my rust experience is... rusty.. heh. its been almost 10 years since i've touched it so i'm having to relearn stuff as i work on this.