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
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.
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: ).
Possible to add a timer widget (optional) which ends guesses automatically at the end of it.
In small streams especially, streamers sometimes worry that closing guesses on a player will drive them away. To help streamers understand if there are users who might still be guessing, display a placeholder line for each person who guessed on the previous round but has not guessed on the current round.
I started on this (I need to merge in the latest changes, and wanted add a settings option to enable/disable it) - does it seem like something you think people would like, or not? Should it default on or off?
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 |
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.
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)
I am unable to install v3.0.3 on my M3 Mac. I have checked both the link on chatguessr.com and the file chatguessr-darwin-arm64-3.0.3.zip directly from the Release page. After unzipping, I get the error "chatguessr is damaged and can't be opened. You should move it to the trash." Up to v3.0.2, I've had no problems. I do not have an Intel Mac to check whether v3.0.3 can be installed there instead, so I am just speculating the issue might be related to Apple Silicon.
Is there a different build or approach I could try? Thanks.
Going through the oauth flow doesn't result in a connected twitch account for me. I don't think my use case is unique, so I'm a bit confused.
Win 11, latest release from the website (3.0.2)
After 5 or so attempts, I added an exception in windows firewall for the executable in apps/local, no dice.
Would be nice to have hotkeys for opening/closing guesses, showing scoreboard, things like that
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.
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.
Would be nice to store all settings there, including timer and scoreboard widgets, for backup/cross-machine setups purposes.
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.
Hello,
First of all, this project is awesome, thanks a lot !
I was, maybe, thinking of adding a feature to the project, but I think it would require to modify the backend's map.
I asked in vinz's Discord, and he agreed with my statement that this repository does not contain the code of map.
I was wondering if you could indicate me (and the community) where is the repository of the map, and maybe the server.
I hope I'm not asking too much.
Have a good day,
The issue only occurs at the very first round after launching CG, and does not occur for everyone. However it works just fine and does not require any restart or refresh, so it's not a big problem, but still.
Even if i think i know why it happens, I am not able to reproduce it.
It is the same error we got when GeoGuessr started to require cookies to their /api/v3/games/id
endpoint.
When they start the first round after launching the app, the first "fetchSeed()" request fails, so at this point Game.seed
is undefined.
This is probably related to the cookies, but like i said i'm unable to reproduce it, unless by deliberately providing wrong cookies, but the question is: why the very first fetchSeed()
request fails, leading to that error, but we still manage to get the seed probably from "refreshSeed()". My guess is that first request has bad/outdated cookies, second request has good ones.
Of course ideally we would like to prevent starting a game if we fail to fetch the seed, but it used to work just fine before we needed to attach cookies to that request.
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.