💥🌾🌾FARMING GAME 🍠🍠 WITH LIVE LEADER BOARD🏆💥
PYer (2543)

A game inspired with the help of @Atari7! With a live leaderboard, you can compete with friends and compare your skills to other players! Complex strategy, never-ending fun, will keep you busy at night. A farming extravaganza, with strategy, thinking, farming, and a bit of luck, have fun!

PS: Those of you who have seen this before, it now works for anybody!

You are viewing a single comment. View All
Haaruun (54)

something is wrong w/ your database specifically the avg function im assumuing its because a user haxor overflowed the average function but i cant test it beacuse in dont have the mongo password

PYer (2543)

there is something wrong with the average function. it is easy for people to add their own data into the database though, im trying to work on a way to fix that. @Haaruun its really hard to add security with a leaderboard like that.

pyelias (922)

@PYer The average function on the server-side is fine, but only taking the first 8 characters in getavg makes it work wrong for large numbers. You should use round or something like this instead. And for security, you could record the users actions and simulate them on the server to make sure the score is legitimate.

Haaruun (54)

@pyelias you would have to do everything on the server move by move because whats stopping someone from faking there actions by changing the benefits that happens while playing. if replit supports it i would recommend websockets to stop the delay from opening a connection and posting each time

pyelias (922)

@Haaruun You can send the random state to the server as well to have it check that the benefits were generated normally.

(something like this and this. Feel free to just copy parts of that, there's no point rewriting it)

Haaruun (54)

@PYer i got a working leaderboard server w/ game verification but im using a free mongodb and bots score so high it wont store it

https://Farming-Game-Server-2--haaruun.repl.co