Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Development > Application Development

Application Development Dev Lounge for the Coder Folks



Reply
 
LinkBack Thread Tools
Old December 18th, 2011, 06:20 AM   #1 (permalink)
mrl
New Member
 
Join Date: Dec 2011
Location: UK
Posts: 6
 
Device(s):
Thanks: 2
Thanked 3 Times in 3 Posts
Confused Best way to implement online high scores?

As title. Working on a puzzle game with levels and a scoring system. Online high scores (one for each level) would be a nice addition to the local scores to induce competition and maybe make the app more sticky. However I'm concerned about ensuring fake scores don't get added, score spamming etc.
  1. What is the best way to do this using shared hosting? My current hosting is the deluxe on linux from here: Web Hosting | Secure Hosting Plans with Unlimited Bandwidth
  2. What language server side? No experience with any of them, but am willing to try and hack my way through. Preferably something a user cannot see to reverse the validation (or is that stupid).
  3. Is this futile? Should I only implement rudimentary protection to protect from the unskilled?

As for the creating a binary or form to send to the server, I'm thinking:
  • Custom binary format.
  • Device fingerprint of some kind, so the same binary cannot be sent from multiple devices.
  • Timeout of a certain interval between creating binary and server receiving, and the server can only receive 1 binary from a certain device in the same interval.
  • Validate the hell out of what they're sending. If it's a fixed level, send their move list in the binary and double check it's possible. If it's a level with random elements, send the whole level and recreate their game.
  • Redundancy in the binary, with elements repeated but in different formats to weed out binary edits.
  • Juggle the bytes so if decrypted/not encrypted, it still looks unintelligible.
  • Then file encryption

Also, how can the binary be created without revealing how it is made? ie what is to stop a hacker from dissecting the code and just calling the routine used to make the binary in the first place? Calling something like
Code:
byte[] createbinary(long score, long levelid, ...)
and sending the result would bypass any and all protection described. A code obfuscator (and possible different coding practices) is the only thing I can think of that will help.

Opinions and experience welcome. If I'm going down the wrong path please let me know

mrl is offline  
Reply With Quote
Sponsors
Old December 19th, 2011, 09:26 PM   #2 (permalink)
New Member
 
Join Date: Dec 2011
Posts: 6
 
Device(s): HTC Hero, Droid Eris, Droid, Evo 4G, Epic 4G, Tattoo, Nexus S
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via Skype™ to swarmconnect support@swarmconnect.com
Happy

Since you're looking for community input, my recommendation is to check out Swarm (www.swarmconnect.com). It's got what you're looking for and it doesn't require much work to setup.

Anywho, I'll admit this is a bit of a shameless plug, but I'm with a team of Android developers (we started back when the G1 was just coming out) and we kept having to answer this very question (about high scores lists) over and over.

Our answer was to make an SDK that includes Leaderboards as one of its features. The whole project just started out as a convenience thing for our team, but then we decided to open it up to the community last week. The Swarm platform is currently in beta, but its pretty solid and had plenty of run-time.

Just my two cents.


Cheers!
swarmconnect is offline  
Last edited by swarmconnect; December 20th, 2011 at 04:02 PM.
Reply With Quote
The Following User Says Thank You to swarmconnect For This Useful Post:
mrl (December 27th, 2011)
Old December 25th, 2011, 03:28 AM   #3 (permalink)
New Member
 
mattwien's Avatar
 
Join Date: Oct 2011
Location: Germany
Posts: 7
 
Device(s): Samsung Galaxy S
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi mrl,

there are a lot of different SDK's available for Android, which handle your requirements and bring some additional stuff, like achievements and some social gaming aspects.
The two I stumbled across are: openfeint (OpenFeint - Mobile Social Gaming Network for iPhone, iPad, Android, iOS, iPod Touch) and scoreloop (http://www.scoreloop.com).

I didn't use them by now in my project, as the usage terms seems to be quite complex. But on the other hand you save some time on coding and all the security issues should already been solved by the SDK provider.

I myself have created a easy online database for my game. It shows you the high-scores on the start page with some animation (sliding in different score lists) and an extra online-highscore list that it a bit longer.

You can have a look at my game and get a better understanding of what I meant:
www.mattwien.de/en/stonesetterapp

I got my inspiration on how to solve this task from
LevelStatsDBConnector of the Andengine game engine.

Hope this helps
mattwien.de
mattwien is offline  
Reply With Quote
The Following User Says Thank You to mattwien For This Useful Post:
mrl (December 27th, 2011)
Old December 27th, 2011, 05:30 AM   #4 (permalink)
mrl
New Member
 
Join Date: Dec 2011
Location: UK
Posts: 6
 
Device(s):
Thanks: 2
Thanked 3 Times in 3 Posts
Default

I have signed up to swarm and will try it when I get time. A cross platform solution would be a bonus so am also looking into openFeint and scoreloop too, but cross platform isn't necessary yet.

Thanks for the responses.
mrl is offline  
Reply With Quote
The Following User Says Thank You to mrl For This Useful Post:
swarmconnect (December 30th, 2011)
Old December 30th, 2011, 12:44 PM   #5 (permalink)
New Member
 
Join Date: Dec 2011
Posts: 6
 
Device(s): HTC Hero, Droid Eris, Droid, Evo 4G, Epic 4G, Tattoo, Nexus S
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via Skype™ to swarmconnect support@swarmconnect.com
Default

Quote:
Originally Posted by mrl View Post
I have signed up to swarm and will try it when I get time. A cross platform solution would be a bonus so am also looking into openFeint and scoreloop too, but cross platform isn't necessary yet.

Thanks for the responses.
Thanks for checking out Swarm. I just sent you an email with some helpful information for getting started, and you're welcome to email us at any time with questions, comments, ideas, or suggestions .

I also want to let you know that the Leaderboards (and other social features as well) have a simple implementation that shows our pre-built screens, or you have the option to use our full APIs so that you can customize the Leaderboards to match your game's look and feel.


Cheers!

-Matt
swarmconnect is offline  
Reply With Quote
Old February 2nd, 2012, 06:16 AM   #6 (permalink)
Junior Member
 
Join Date: Oct 2010
Location: Munich
Posts: 17
 
Device(s):
Thanks: 2
Thanked 1 Time in 1 Post
Default

Howdy folks, Ben here with Scoreloop.

Now more than ever, there are a ton of great options to integrate high scores and leaderboards into a game.

Scoreloop has grown massive (welllll over 100 million users, with millions more each week), and our feature set has grown to match this demand.

Our solution is white label for a seamless experience, but comes with a default interface if you want that fast one-and-done integration.

Our features are modular, so you can use what you want and leave the rest on the cutting room floor. That said, we think you'll want to use a heck of a lot! For a free SDK, we're packing quite the punch - leaderboards, achievements, player profiles, social network posting, IAP payment solutions (with more payment partners to come!), virtual currencies (which can be purchased via IAP as well as tied to achievements and used in Player Challenges), asynchronous "player challenges" [think my score vs. your score], news feeds and much MUCH more.

Definitely get in touch with our dev relations team or hit me up personally via PM if you have more questions
BenjaminJC is offline  
Reply With Quote
Reply

Bookmarks

Tags
communication, highscore, online, protection, secure, server, validation


Go Back   Android Forums > Android Development > Application Development User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -5. The time now is 11:57 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo