Giter Site home page Giter Site logo

chatguessr's People

Contributors

itisem avatar mramericanmike avatar reannannanna avatar tzhf 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

chatguessr's Issues

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.

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)

[Suggestion] Add timer

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

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.

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.

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

Hotkeys

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

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.

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

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.

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.

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.