Giter Club home page Giter Club logo

chatguessr's People

Contributors

itisem avatar janosgeo avatar mramericanmike avatar reannannanna avatar tzhf avatar vinz3210 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

chatguessr's Issues

Youtube Live Stream Integration

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.

[Enhancement?] add support for webp flags

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):

async function findFlagFile(id) {
const customFlagPaths = [
path.join(customFlagsDir, `${id}.png`),
path.join(customFlagsDir, `${id}.svg`),
];

where it gets rendered i think (for reference):

renderGuess(guess) {
const guessRow = {
Position: "",
Player: `${
guess.flag ? `<span class="flag-icon" style="background-image: url(flag:${guess.flag})"></span>` : ""
}<span class='username' style='color:${guess.color}'>${guess.username}</span>`,
Streak: { current: guess.streak, last: null },
Distance: { value: guess.distance, display: this.toMeter(guess.distance) },
Score: { value: guess.score, display: guess.score },
};

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: ).

[Suggestion] Add timer

Possible to add a timer widget (optional) which ends guesses automatically at the end of it.

[Enhancement] Show players who have not guessed yet

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?

Show time on 5Ks

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

Store game "in-progress"/"finished" state in the database

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.

Count hedge streaks

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)

Cannot install v3.0.3 on Apple Silicon (M3)

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.

Can't login to twitch

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.

Here's how it looks for me:
oauth

Timer is out of sync

Was just testing the software for the 1st time, noticed the timer is out of sync with round start (both at 60 seconds), sometimes by a lot:
image

I assume due to lag and it loading too late.

Hotkeys

Would be nice to have hotkeys for opening/closing guesses, showing scoreboard, things like that

Improve migration of electron-store stats to SQLite

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.

Security issue: OAuth token sent to server

When a map is complete, the result is uploaded to the server to provide a list of results. The request contains:

  • streamer name
  • bot name
  • map name
  • mode (no pan, no zoom, no move)
  • list of locations
  • list of player results

But also:

  • bot OAuth token

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:

  1. The result listing is a single request providing a response containing the game code, that the bot then posts to chat. Thus, to forge a bad listing for the chat, also the bot account needs to be compromised to post the code in the chat itself. Otherwise, it will just be a random link.
  2. The bot name and OAuth is not presented in the status listing itself, so faking all information but the bot account will still make a status listing that looks valid, even with faked data.

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.

Auth window lingers on macOS

image

my understanding is that this makes the application unusable on macOS.

I should get a mac laptop in the next month or so, then I can work on it.

Skip round

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.

Repository of the backend or of the map

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,

"Cannot read properties of undefined (reading 'rounds')" on the first round after starting CG

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.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.