Skip to content
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

Leader Board #105

Closed
kentcdodds opened this issue Mar 25, 2014 · 8 comments
Closed

Leader Board #105

kentcdodds opened this issue Mar 25, 2014 · 8 comments

Comments

@kentcdodds
Copy link

I looked over your guidelines and I don't believe this falls under a "wont do" category. I have made a fork of your repo which allows users to authenticate with 4 different networks and keep their high score (rather than local storage). My implementation isn't completely clean, but I wonder if you'd be interested in including the concept into the game itself. I would also think that having a leaderboard would be a lot of fun as well. There are a lot of directions you could take this I think.

My question is: are you interested in taking the game this direction?

If you're curious, here's my implementation (and the repo)

@iirelu
Copy link
Collaborator

iirelu commented Mar 25, 2014

Mandatory log-in is a HUGE no, and what 4 networks are you trusting, exactly? Having to maintain the server-side required for authenticated leaderboards is massively complex and not even slightly worth it.

It's been asked before, in #39. 2048 seriously doesn't need a leaderboard.

@kentcdodds
Copy link
Author

Hold on a sec @iirelu... Who said it was a mandatory login? And you obviously didn't look at my implementation if you don't know which 4 networks I'm "trusting." (they are, GitHub, Facebook, Twitter, and Google+).

As far as the complexity, we have things like firebase to handle all of our server stuff for us. My implementation currently keeps track of the best score in firebase, but it could easily be extended to keep track of the leaderboard for us as well. We wouldn't need any server-side code at all.

I looked at #39, (sorry, I didn't look thoroughly enough before posting this issue) and what Yogu proposed would be quite a bit of work and yes, we wouldn't be able to avoid forgery because this all running in the client. Perhaps that is reason enough to not implement it, but don't tell me it's too difficult, because I implemented an early prototype in about two hours and I'm a JS padawan.

@iirelu
Copy link
Collaborator

iirelu commented Mar 25, 2014

This is what I'm seeing, looks pretty mandatory to me.

The problems with having a server is less about code and more about having to worry about paying the bills and uptime.

@kentcdodds
Copy link
Author

Your right. My implementation made it mandatory, but if we don't like it, we don't have to do it. And I would recommend making it optional. As far as the uptime, firebase can deal with that.

The cost is a good argument, but I bet there's a solution there too. I actually happen to have a blaze plan that gives you:

  • 2,500 Connections
  • 250 GB Data Transfer
  • 30 GB Data Storage

And I believe that if we simply use the rest api rather than a web socket connection, that 2500 connection limit is much higher.

I would be willing to donate my blaze plan for this effort until it is self sustainable.

@iirelu
Copy link
Collaborator

iirelu commented Mar 25, 2014

This still adds multiple points of failure and unneeded complexity. What does a leaderboard give you that outweighs the disadvantages of having to rely on a server?

@kentcdodds
Copy link
Author

I don't think that we need to argue the benefits of a leaderboard. It has some obvious benefits that tons of games have taken advantage of. But if that's outside of the scope of this project then that's fine by me. Just want to be helpful. Would love to hear what @gabrielecirulli has to say though...

@gabrielecirulli
Copy link
Owner

I mostly agree with @iirelu on the problems with the cost of resources and the problems with forgery. I think it wouldn't make much sense to do anything like this unless there were a surefire way to avoid forgery, and even if there were one, we'd still be up against resource and maintenance costs. I also like the idea itself, but as @iirelu also said the costs outweigh the benefits. Personally, I think that Twitter is good enough as a scoreboard, also because it adds a social element that allows the game to spread.

@kentcdodds
Copy link
Author

The forgery issue is good enough for me. The costs are an issue as long as this is kept free (which I think it should be). Perhaps there could be a native mobile paid version that would provide this functionality in the future.

Thanks for the comment @gabrielecirulli. I'll close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants