tzhf / chatguessr Goto Github PK
View Code? Open in Web Editor NEWA Twitch chatbot for GeoGuessr.
Home Page: https://chatguessr.com
License: MIT License
A Twitch chatbot for GeoGuessr.
Home Page: https://chatguessr.com
License: MIT License
Sometimes you get black screens or unofficial coverage in a game.
There should be a way for the streamer to skip a round, so any guesses already submitted in that round don't count, and player streaks and scores are unaffected.
This could be a hidden-by-default column in the game results screen. Count consecutive games where a player had 20K+ score (or configurable score)
Possible to add a timer widget (optional) which ends guesses automatically at the end of it.
For the Victories statistic in !me and !best, the SQL queries need to know which games have been completed. Right now they check if a game has 5 rounds and assumes then that it is complete. This is wrong, because the game has 5 rounds at the start of the 5th round, so if you do !me
before the round is complete, it will already count that game.
A possible solution is to add a state
column to the games
table which is switched to "finished"
after the game results are calculated. Then the !me and !best queries can use that instead. It will likely also be faster than the current solution.
Some streamers run streaking competitions, and you only know the final streak once a player has lost it, but at that point CG doesn't show it anymore. We can show it like this:
Player | Streak |
---|---|
zehef_ | 2 |
ReAnna__ | 0 (4) |
We are now sorting 5Ks by guess time to reward players who found a 5K fast the most, instead of players who spent a long time & then happened to get 1m closer. But it's a little confusing to people. The Distance column could show the time as well for 5Ks so its clear how it disambiguates.
Player | Distance | Score |
---|---|---|
zehef_ | 17m (0:28) | 5000 |
ReAnna__ | 3m (0:57) | 5000 |
unlucky | 199m | 4999 |
Would be nice to have hotkeys for opening/closing guesses, showing scoreboard, things like that
When a map is complete, the result is uploaded to the server to provide a list of results. The request contains:
But also:
That means the bot OAuth token, which is for security to handle as a password, is sent to the server so the server have access to several functions as the bot user. And to protect the streamer, that should never be sent to a third party (such as chatguessr servers, but kept within the client)
This is added in commit f20facc
For what I can tell, the reason for this change is to authenticate the data for the result listing. Which I see two problems with:
An proof-of-concept of a fake status listing (from valid bot oauth) can be found here:
https://chatguessr.com/game/ovapudocep
Therefore, I suggest the OAuth token simply is not sent to the server, since it doesn't give protection about fake listings, and due to point 1 above, it's ok.
If it would be for validating for high score lists, or competitions, require the VOD from the stream with chat replay, or in advance let the ones managing the competition join the chat. In that way, the game code would be authenticated from chat.
webp is a quite popular format on the web, and it would be convenient to be able to use them for flags. from what i can tell, the only change this would require is adding an extra line in this segment, as electron should support webp by default (as should the css background-url property):
Lines 55 to 59 in 48be88b
where it gets rendered i think (for reference):
chatguessr/src/Classes/Scoreboard.js
Lines 250 to 259 in 48be88b
this is not high priority, just thought i'd bring it up in case it's that simple to do. i also don't know if there are any other considerations to be made. it's not that hard to convert either way (for me, that is - plus my original reason for this was discord emojis, which are also available as png apparently D: ).
Migrations currently don't account that well for existing user stats. I tried to combine the DB and electron-store stats in legacyStoreFacade.js
, but it's not correct in some cases, for example the number of perfects should be summed for each user from the DB and the JSON store instead of taking the highest value.
The best way to do it would be to have a SQLite table with all the legacy stats for each user. This can then be used in queries for !me
and !best
.
e; We are shelving this for now. If some users really don't want to lose their stats we can look into it but likely people won't mind so much.
Feature suggestion: Youtube live stream integration.
I think youtube integration would be great for ChatGuessr. The minimal version of this integration is by using the existing map and pasting the command on Youtube chat (without login on ChatGuessr).
Could you explain/give a guide on how to modify the source code to accept guesses on Youtube (maybe via API)? I have some experience coding in python and a bit in javascript, and I want to try doing this integration if it's outside the scope of what you're working on.
Thank you.
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.