How can I prevent someone from spamming my rankings?

0 favourites
  • 5 posts
  • I made a code that sends and receives firebase data, according to the score, but how to prevent users from putting "inappropriate" words as name? and that they keep sending scores every second?

  • As for the inappropriate words, you'll have to filter them out somehow. This has always been a little bit tricky, as people like to get creative with stuff like A$$ or A.S.S and such. Also you have to avoid filtering out common words like ASSemble just because they contain a no-no word. There's probably some libraries out there (https://www.npmjs.com/package/bad-words) or javascript code (https://stackoverflow.com/questions/56456144/javascript-simple-profanity-filter) but ideally you'd do that server-side and not client-side.

    And for sending scores every second, it depends a little on how the game is designed. But if you could e.g. only allow to send the score if it's a new highscore. Or there is some kind of timeout. Or it's only possible to send the score after a finished game.

  • As for the inappropriate words, you'll have to filter them out somehow. This has always been a little bit tricky, as people like to get creative with stuff like A$$ or A.S.S and such. Also you have to avoid filtering out common words like ASSemble just because they contain a no-no word. There's probably some libraries out there (https://www.npmjs.com/package/bad-words) or javascript code (https://stackoverflow.com/questions/56456144/javascript-simple-profanity-filter) but ideally you'd do that server-side and not client-side.

    And for sending scores every second, it depends a little on how the game is designed. But if you could e.g. only allow to send the score if it's a new highscore. Or there is some kind of timeout. Or it's only possible to send the score after a finished game.

    is there a way to log in with a social account to save the ranking? facebook example

    then I would get the person's facebook name

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Firebase has a login system with Google accounts.

  • How do I organize my code to get only the top 10 scores?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)