-
Notifications
You must be signed in to change notification settings - Fork 16.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement a leaderboard #39
Comments
Hi! I don't think this can be done in the current state of things. It'd require a big amount of work to implement a server to store the scores, which is a thing I'm not prepared to do at this point. Right now, the main vehicle for score sharing is twitter and it seems to be doing a good job so far |
@robertboloc Hi. How could score forgery be avoided? |
I understand. I haven't really thought about the implementation of this feature. |
😄 right now my best score is near 5000 points so, not yet, but with all the time I spend playing this game maybe I will... 😉 |
I thought about preventing forgery a bit and this is what I came up with: If you want to prevent the client from "undoing" an action, the client must send its move to the server, which then responds with the "random" tile added. This significantly decreases performance, especially for users with high ping. I think we'd have to live with the possibility of clients with an undo feature, if they exist. But if you don't care about undoing, the following concept should work:
If you can share the game mechanics between server and client (with node.js), it shouldn't be that hard to implement. To reduce the server load, you could only accept scores that will be within the top 100 if accepted. |
@gabrielecirulli I love 2k :-) 5th game = 2nd win & new best score |
@Yogu thanks for the ideas but I'm not willing to personally withstand the server hosting costs and the development time for this feature. |
@gabrielecirulli Awesome game! :) |
@aks0 Damn. You passed me, good job 👍 |
Sorry guys, gotta close this. Nice scores, though. 👍 |
@Yogu Interesting thoughts on anti-forgery. One problem though, is that as long as the client decodes the random number generator it can predict the next game state deterministically. Then the search problem becomes significantly easier once you know what and where the next tile is, it is not a alpha-beta search anymore. |
@Yogu BTW, here is an implementation of global leader board: http://go2048.com/rank.html |
@charliezhang That's what I meant with
because otherwise, the game would be really slow (contacting the server for each move). Thanks for the leaderboard link, got 29th :-) |
It is nice to see one's high score, but it would be better to be able to compare with others
The text was updated successfully, but these errors were encountered: