Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some Tournament Demos Skipping First Round in parseEvent #59

Open
dbalders opened this issue Nov 1, 2023 · 11 comments
Open

Some Tournament Demos Skipping First Round in parseEvent #59

dbalders opened this issue Nov 1, 2023 · 11 comments

Comments

@dbalders
Copy link
Contributor

dbalders commented Nov 1, 2023

Error: For demos from some tournament organizers, it seems that when parsing events like round_start/round_end/etc, it isn't capturing the first round of the match. It is starting on round 2. TotalRoundsPlayed is already at 1 for the first object in the array.

Version: 0.12.0

Code: let roundStartTimes = parseEvent(demoFileName, "round_start", startEvents)

Example 1 (Broken) (Thunderpick): https://www.hltv.org/matches/2367520/furia-vs-apeks-roobet-cup-2023
Screenshot 2023-11-01 at 1 14 51 PM

Example 2 (Broken) (Roobet Cup): https://www.hltv.org/matches/2367600/complexity-vs-mouz-thunderpick-world-championship-2023
Screenshot 2023-11-01 at 1 15 23 PM

Example 3 (Working) (ESL Challenger League): https://www.hltv.org/matches/2367288/bad-news-bears-vs-nouns-esl-challenger-league-season-46-north-america
Screenshot 2023-11-01 at 1 15 55 PM

Example 4 (Working) (ESL Challenger League): https://www.hltv.org/matches/2367484/spirit-vs-saw-esl-challenger-league-season-46-europe
Screenshot 2023-11-01 at 1 27 02 PM

Example 5 (Working) (CCT): https://www.hltv.org/matches/2367826/forze-vs-preasy-cct-central-europe-series-8
Screenshot 2023-11-01 at 1 38 58 PM

Example 6 (Broken) (ESL Impact): https://www.hltv.org/matches/2367268/9-pandas-fearless-vs-gl-prism-esl-impact-league-season-4-europe
Screenshot 2023-11-01 at 1 44 25 PM

@LaihoE
Copy link
Owner

LaihoE commented Nov 1, 2023

Yes I think this was also a bug in csgo demos, seems like they didn't fix it for cs2.

Unfortunately I'm quite confident this is not a bug in the parser, but a bug in the demo and so there is no easy fix. It's quite interesting that it works for some demos 🤔

@dbalders
Copy link
Contributor Author

dbalders commented Nov 2, 2023

Ah, bummer. I'll comment back if I can find a workaround. For csgo, I was using demofile and ya had to use entity changing cause I think I remember that too with it not triggering the actual event:

demoFile.entities.on('change', e => {
     if (e.changes[0].tableName === 'DT_CSGameRules' &&
         e.changes[0].varName === 'm_bFreezePeriod') {

@LaihoE
Copy link
Owner

LaihoE commented Nov 2, 2023

Yeah seems like implementing something similar will be needed. I'm just wondering didn't that absolutely ruin performance?

@LaihoE
Copy link
Owner

LaihoE commented Nov 2, 2023

of course there is a tiny chance that they fix the events for cs2. Not too hopeful tho...

@dbalders
Copy link
Contributor Author

dbalders commented Nov 2, 2023

I'm not sure about performance, I'm sorry. Didn't have anything to compare it to since I had to do it at the very beginning to be able to get consistent data.

@dbalders
Copy link
Contributor Author

dbalders commented Nov 2, 2023

I submitted a bug report to them, so we will see.

@UROjQ6r80p
Copy link

UROjQ6r80p commented Nov 3, 2023

@LaihoE @dbalders
I checked those matches mentioned above in demoinfocs-golang.

the first round event is emitted in both matches (by workaround I guess), found this line, might be helpful: https://github.com/markus-wa/demoinfocs-golang/blob/master/pkg/demoinfocs/datatables.go#L1205

Also in https://github.com/saul/demofile first round_start event is not emitted saul/demofile#377 same issue.

@LaihoE
Copy link
Owner

LaihoE commented Nov 3, 2023

I went and looked at the demos and the ones that are breaking are those that start when the first round has already started. Is this normal for pro demos? Was this also the reason for the csgo demos missing the first round?

@UROjQ6r80p
Copy link

I have not seen enough of those demos, but I assume it's rather normal on HLTV to start demo few seconds after first round when players are just leaving their spawn, also not sure whether that was the reason of missing first rounds in csgo demos.

@dbalders
Copy link
Contributor Author

dbalders commented Nov 4, 2023

I don't know 100% since I've never built the actual demo parser. But, historically the demos do not start mid already in first round. Usually its mid warm up round which gets reset (sometimes multiple times) before the match actually starts. With the code I sent earlier I can capture the first round of every csgo demo (and did for the last year+), so it is resetting to start the round, just not in the same way it starts all the other rounds for some reason.

@dbalders
Copy link
Contributor Author

Their last 2 cs patches did both mention changes to the demo system. So, maybe work is still being done. Also, just wanted to say I appreciate your work on this package @LaihoE. Thank you for making it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants