Game statistics
-
-
Thanks
-
@mitu
Do you think it would be possible to assume I am running on RetroPie and source the helpers into my scrip? Or do I need to copy the code? -
@langest It's up to you - however without a RetroPie installation the
joy2key
program might not be available to run. -
@mitu
What would make the most sense to me would be to reuse the already implemented functionality in retro pie, because I don't plan to use the dialog interface anywhere else.
The end goal of the tui is to add it to experimental programs in the retro pie install script.
I tried to source the files, but I most likely did something wrong.
I haven't really done much bash programming before so I am not sure how everything should be set up. Could you give me some pointers to get started?
ThanksOn a separate note, I have come up with some neat new features for the python program that I am going to add. Such as bar chart for visualization and weekly/daily activity.
-
@administrators Maybe this thread should have been in the ideas and development sub-forum.
-
@langest said in Game statistics:
new features for the python program that I am going to add. Such as bar chart for visualization
Got it implemented now together with a new exclude flag as well:
$ python3 /home/pi/repos/RetroStats/retro-stats/game_stats.py -c total -b 20 -n 4 -e kodi Wario Land 3 ▏ 6:36:28 ████████████████████ Crash Team Racing ▏ 2:01:08 ██████ Super Mario 64 ▏ 1:59:56 ██████ Pokémon Pinball: Ruby & Sapphire ▏ 0:55:12 ██▊ $ python3 /home/pi/repos/RetroStats/retro-stats/game_stats.py -c total -b 20 -n 3 -s nes -c times Balloon Fight ▏ 3 ████████████████████ Salamander ▏ 2 █████████████▎ Smurfs, The ▏ 1 ██████▋
-
I have implemented the daily schedule feature. It can now tell you when during a day you spend most time playing your games.
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ░░░░▒▒▒▒░░░░▒▒▒▒▒▒▒▒░░░░░░░░▓▓▓▓▒▒▒▒▓▓▓▓████████░░░░
Next step would be to extend the daily view to a weekly view so you can track your invested time per hour per week day. And possibly add some machine learning to categorize invested time to get a nice gradient. Right now I hardcoded some values that looked good on my data.
Of course you can use this new view with some selected systems or excluded systems.I also updated the format of the log to make sure that the time in the log is UTC. I then convert to your local time zone when printing. You either throw away your current log or use the convert script here: https://github.com/langest/RetroStats/commit/e8567b456c6e2f3d5e9bdbf6f764d9abcca3361f if you want to keep your data.
Also, if someone who reads this could give me some pointers on how to make this available in the install script experimental section or how to the controllers working in the TUI, I would be grateful, more detailed question above. Until then you will probably have to run this via CLI.
-
I extended the daily view to a weekly view and added a recent history option and a lookback option. Lookback decides how many recent days you want your stats from.
$ python3 /home/pi/repos/RetroStats/retro-stats/game_stats.py -w Monday 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓ Tuesday 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ▒▒▒▒▓▓▓▓▓▓▓▓ Wednesday 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ▒▒▒▒████████▓▓▓▓ Thursday 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ░░░░▒▒▒▒▒▒▒▒████▓▓▓▓ Friday 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ░░░░░░░░▒▒▒▒▒▒▒▒░░░░░░░░▓▓▓▓████▓▓▓▓ Saturday 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓████▓▓▓▓▓▓▓▓▒▒▒▒ Sunday 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▓▓▓▓ ▓▓▓▓████████▓▓▓▓████▓▓▓▓
$ python3 /home/pi/repos/RetroStats/retro-stats/game_stats.py -r -n5 2019-11-01 19:36:37+00:00 gba Pokemon Gaia 2019-11-01 19:15:18+00:00 n64 Mario Kart 64 2019-11-01 18:49:16+00:00 kodi 2019-10-31 19:39:49+00:00 gba Rhythm Tengoku 2019-10-30 20:37:13+00:00 megadrive Sonic the Hedgehog 2
-
I wrote a server to deliver your stats, so now you can get them in your browser on your PC or on your phone.
Currently looks pretty ugly since I haven't put any effort into that yet. But most of the functionality is there.
If you want to test it out, install it by cloning the repo and runpip3 install . --user
and start the server withretro-stats-server
. Using your browser go to<retropie_ip>:5000
.PC:
Phone:
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.