Leaderboard in mobile game.

2 posts (showing 1-2)
DonReptile

Market Level 0Community Level 0
6 posts

Hello once again.

I want to building leaderboards in my game. Game is based on html5 + pixi.js, simple endless platform. However I want to build online leaderboard, and maybe there is someone who did this too, and have experience in this.
My idea is:
1. Build simple POST in game.
2. Or send data via socket.io - I am new with this technology, but i guess it's harder to cheat with this, and it has better performance?

I am not sure, if my game will have access to internet when compiled with phonegap ?
I have no idea how to identify user. Do i have access to user mobile number, or there is other way to identify user, maybe more anonymous than mobile number? ;) or should i use their google account?

Last but not least is security. For sure I don't want users to cheat and publish idiotic and unreal scores. I know there is no 100% secure way, but 99% will be fine, and i guess my game wont be so important, to spend too much time hasking it. So back to topic. Maybe something like secret key inside app and encrypting messages ? I am also not a pro in encryption, so please don't use too many difficoult terms :)

Thank you for any advices!

Maciej.

posted 2015-08-24T11:52:14-07:00
DonReptile

Market Level 0Community Level 0
6 posts

Ok, so I was researching, and I will try to answer myself a bit ;) so far answer is "it is impossible to protect game that has logick in client side".
I do believe it's true. So the main goal is to decide if you have super important highscore that means a lot, or not. If you do, so you have to move logic to server-side. If not, you just need to make it harder to hack - just to discourage potential hackers.
How to discourage?
* Obfuscate code
* Don't send score as intiger. Maybe think about sending multiple variables, that will be calculated as final score on server.
=> this 2 points may be enought, but if not, there even more!
* On upload check, if user score is in top 100, and if true, send additional data like full game recorded etc. to verify if not hacked.
* You can verify users via facebook, or even show only local highscores with your friends. - However I never liked games connected to facebook, so I wont use it for sure ;)

posted 2015-08-25T07:47:29-07:00