jannislehmann / csgo-tools Goto Github PK
View Code? Open in Web Editor NEWA toolset for csgo, which automatically downloads new demos and features a demo parser for (currently basic) performance metrics on match and player basis.
A toolset for csgo, which automatically downloads new demos and features a demo parser for (currently basic) performance metrics on match and player basis.
Add opentracing / jaeger tracing to the project.
The pkg
does not contain re-usable packages.
Currently everything shares one database and schema. However, the data itself might not fit a relation database perfectly. We could consider switching to a document or column database.
We want to be able to sign in using a Faceit oder Steam account.
Requesting hundreds of demos at once does not work because the GC only returns a few at once. Therefore, we could simply add a channel to it and request one demo after another.
Really good resource: https://venilnoronha.io/designing-asynchronous-functions-with-go
The Steam API sometimes returns an invalid JSON response and thus the csgo api users get disabled even though their credentials are working.
The parser also has information about each player's K/D/A etc. Maybe there is more useful information we could utilize.
In order to calculate the amounts of trade and entry kills, a flag must be set for each kill during parsing, whether one of these fits.
Apparently, the gameclient seems to loose the connection to the game from time to time. However, the error handler is not called and therefore we cannot auto-restart.
The apiclient currently disables csgo users for further match fetching when the host running the codes times out.
In order to not disable the users by mistake, the error handling should be improved insofar that we detect whether the api returned an access exception or a temporary timeout happened.
When the gameclient receives the match download link from the coordinator, it should directly download it or enqueue it for later downloading. This would reduce the complexity a little and will help with a later database refactor.
We want to able to tell how often a player (/team) wins rounds with either no equipment or a full buy versus full buy / eco enemies.
A first version could simply use the round after the pistol rounds in order to check which teams win these rounds as they are kinda anti-ecos.
We want to parse each demo file and persist the data in the database to calculate further information and stats based on the information.
In order to be able to reparse demos when the parser adds new information, we need to add a parsedWithVersion
flag to the match entry in the database.
We want to provide more information about every kill such as a kill log for every match. In order to do so, we have to persist every kill in the game.
Some Primary Keys are too dependent on some sources like the match id from Valve MM demos. However, if we add support for Faceit demos, this will break. We should therefore refactor some primary keys and some models.
The defined GH actions run twice on each pull_request push for the events push
and pull_request
.
We want to allow the parsing of third-party demos.
The main issue here is the demo importing as it heavily relies on the match id and download url.
Until recently, the Git tags were also used for the Docker images. However, this broke within the last version (1.1.0).
We want to able to receive the amount of won rounds where the player was alone and played against >= 3 players.
The processed match result should be persisted in the database in order to serve them through a possible API.
However, in order to reprocess already processed demos if new parsing methods are added, a flag to reparse should be add. But, we do not want to reparse all demos, to fix that we could add a parsed with version x
to the match result struct.
Either REST or GraphQL. However, GraphQL does not seem to fit this project.
The rest api routes should be documented. If suitable, we could also add Swagger.
Currently, in order to build the Docker image, the whole project root directory is copied (with a few exceptions). This should not happen to prevent leaking private files.
We could also add a two-step image builder. The first step being a golang builder.
We want to get the amount of rounds where the player got >=3 Kills.
Sometimes a PlayerResult
with the SteamID
of 0 and all others stats of 0 show up. However, the death count is 1.
My guess is that those player disconnected or got banned.
The match id we use to scan the demo file names and the match ids, which the GC return, are not the same.
Therefore, demos could be downloaded twice in the following scenario:
The file name in the download link matches the match id from already downloaded demos. However this is different to the decoded match id.
A possible way could be to check the file names of the to be downloaded demo and query the db for this specific id. If that exists, skip the download.
However, the best way would be to somehow merge the entries.
Build, Lint and Release all applications
scope.gg and Leetify have some great REST resources, which I want to use to collect some further ideas.
Currently demos downloaded via the game might get downloaded again via the download tools.
Therefore, I have to find a way to scan demos for some unique identifier, before storing them.
Existing demos might be opened and the matchid might need to be extracted.
When decoding the share code multiple times, the outcome id stays the same. However, the match id varies slightly.
My guess is that this comes from slight differences when using the float.
Therefore, the outcomeid should become the primary key.
Example:
Created | Updated | Deleted | MatchID | OutcomeID | Token | Sharecode |
---|---|---|---|---|---|---|
2021-03-13 17:29:02.097343+00 | 2021-03-13 17:29:02.097343+00 | 3469236333430440513 | 3469240190311072117 | 50359 | CSGO-6MdTE-qNtNC-kiybE-DCDQ5-qVSFE | |
2021-03-13 17:29:02.097343+00 | 2021-03-13 17:29:02.097343+00 | 3469240190311072117 | 3469240190311072117 | 50359 | CSGO-6MdTE-qNtNC-kiybE-DCDQ5-qVSFE |
We could also already create some Kubernetes manifests.
Currently, we mark a demo as downloaded if the download link as expired. Therefore, the demo parser tries to open and parse the specified demo. Thus, an error is returned since the file does not exist.
We should probably change the architecture or database structure a little to better differentiate.
I want to save every shot fired in order to be able to calculate each weapon's accuracy.
A message broker could be add to allow communication across the different services.
This is somewhat overkill and is mainly meant to try and learn using a message broker e.g. RabbitMQ.
This would also replace the "communication" using the database.
This could be used for some further statistics. As a terrorist player you must not die after running out of time or in general you don't want to die if the round was won / lost (when saving).
In order to detect whether a team had an eco round or full buy, I need to save the equipment value while parsing the data.
The csgo parser exposes the following data per player:
MoneySpentThisRound
MoneySpentTotal
EquipmentValueCurrent
EquipmentValueFreezeTimeEnd
EquipmentValueFreezeTimeEnd
All this data could be used to determine the amount of eco round wins/losses and anti-eco round wins/losses etc.
I already wrote a PoC script to check all this data but need to rewrite this in order to fit into this project.
In order to expose information who killed whom during a round, we need to persist a kill log for each round.
This data might make the information about the k/d/a somewhat redundant as that could be calculated by the api during runtime.
I want to save the nade thrown etc. events to be able to parse the following and probably more:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.