Detect end of game ?
huge thanks Hello, so i have been working on seperate project for quite some time now and ffinally feel confident enough that i can make it public lol. Here it is: owstats <== This is the app itself owstatsapi <== The api that stores and serves stats owstats-ocwatch <== The fork for this tracker modified to send data to owstatsapi
The stage version is here: owstats stage
Basically it's a stat tracking system for users that i'd like to expend so users can share their stats and see how well they are doing compared to other users of the same level etc... you get the gist :p BIG thanks to you this has been possible only recently thanks to your amazing work on this repo seriously huge thanks
Is your feature request related to a problem? Please describe. So now i have an issue, the owstats is intended to store end of game stats not overtime, so i've have been trying to find a way to only lunch the track.py when the game has ended sadly i cannot figure it out...
Describe the solution you'd like Ideally, once the game ends it trigger the TAB and screenshot processing.
Describe alternatives you've considered I tried the following:
- Using the game time and see if the new game time is > then the game time in latest.json and if yes this means it's a new game. This is prone to failure since maps dont have the same start time and the user can forget to take screenshot early enough in a new game, plus it's so much code for so little.
- Trying to auto take screenshots and scrap them for the end game screen (no success)
Additional context So i'm very new to Python thanks to your repo i have learned alot, with that said i have no idea what is the best way to solve this, i see in the latest.json there is a key for state but it's not updated AFAIK, have you tried something around this ?
PS: I'm a bit short right now, but once i get some income promise i'll sponsor this project! PPS: I made sure to reference your project in the download tracker page of owstats, now i'm not good with design but i hope it's okay with you! if not just tell me and i'll change it! And again, thank you so much!
I tried getting it to track the end of a game, but it's not easily possible.
For this, I ended up just adding commands like win and loss you have to type at the end of a game to track its result and mark it as finished.
Could potentially take a screenshot every few seconds of the ingame timer at the top and at least determine if the match is done that way - I'll have to play around with that when I get a chance c:
Wow thank you for the quick response!
I'll try with the auto-screenshot if i manage to get it working i'll push it my fork and ask for your review on it if that's okay :)
I've managed to achieve something i think, here is the commit
Basically it takes a screenshot each 5 sec, and try to find the player's name in the bottom left corner:
And it should crop it to this:

So if the name is missing, the game has ended.
The name need to be setup in the config.ini for this to work, the reason for why the name is required is that the ocr finds letter/symbols/numbers in the portrait section even when there is nothing, i'm guessing it's the tesseract.
What are your thoughts on this ? :D