View Full Version : Online Highscores

15-12-2005, 10:11 AM
Hello guys,
I've a question for you about using online highscores in my games.
It's some days I'm thinking about it but I'm not sure which method to use.

These are the options:

-When you submit your name and score, program checks if you are online
and, if so, submit your score to the webdb and finally the game displays
highscoretables inside the game window. If you are offline of course the
game will update the local highscores, that could be the last ones you
downloaded. This is an integrated solution, that may look like the one
you can find in Babu Puzzle (visually speaking).


-When you submit your name and score the game always saves local
highscores table and ask you if you want to post it online too. If so, the
game will send an http request calling a jsp page that insert the record
and then redirect to a generated html page for viewing, surely linked on
my website. That cannot be done in the game window but it will need a
browser to open.

Which one do you think is better? and why? I'm evaluating both solutions
and i can't decide which one to use.. The first may look more solid, the
second i think gives you a better idea that you are "online" or taking
part to a community or.. you know what i mean ;)

I'm 60% for the first solution and 40% for the second right now.

Thanx in advance,

15-12-2005, 11:35 AM
IMO the first option is the better one. I dont think I have seen a game that uses method nr 2.

Interesting topic though. Have you explored the first method on how to accomplish this?

15-12-2005, 12:24 PM
The first one is much better, I am also doing it this way.
The offline hiscores are much too easy to manipulate.


15-12-2005, 12:41 PM
I dont think I have seen a game that uses method nr 2

I posted the other method because I saw some indie games that open
the webbrowser to show highscores, but I think it's only to increase
the number of visits on their site :P

Have you explored the first method on how to accomplish this

Yes I have. As I work in java also for web applications I set up a very
small app in which i create a connection pool to a small Access Db and
then I post the requests via Delphi through http. I send the request and
obtain an http response that i can read as a string list or token string, but
this is due to imagination only, like:



Palyer1|Score$Player2|Score$Player3|Score$...$Play erN|Score

and so on. Got that string/stringlist it is basically the same I already do
for highscores now.

The chain should be like this:

Delphi->http request->jsp page processing,insert record into db and
return a stringlist (invisible to user)->http response->Delphi (draw
highscores reading thegiven stringlist).

This is quite a simple method but already tested and working, I hope it's
clear because I feel my english very rusty so the explanation may look a
bit confusing ;)


16-12-2005, 04:22 AM
I think you need to ask yourself if you want to allow people to play your game on computers that are not online 24/7? Otherwise you add the condition that the computer has to have an internet connection just to play your game. And it's not always going to be the case.

So if you do want to allow people to play while not online, you have to choose the alternative means. A) Have an Offline Highscores list OR B) Just don't save the highscores anywhere.

Best to keep your solution simple and to the point or you'll just run yourself in circles and make a mess of it's implimentation.

16-12-2005, 10:31 AM
I think you need to ask yourself if you want to allow people to play your game on computers that are not online 24/7?

The answer is no, of course. I want to manage both online and offlinine
highscores. If you have played Babu puzzle you can see offline HS, and
i want to keep them. Simply if the player is connected then I'll send the
request to get the list of online scores else you will work just like now.

Is it clear? :oops: sometimes I think I'm not able to explain things :P


16-12-2005, 02:22 PM
Way 1 is obviously good, but what if you get a coolCoolCOOL highscore and server has crashed just before that and can't be transmitted, or you have made very high score offline and want others to know.

So i would make there "Update Online" button and open tcp socket to server app. Then transmit the full highscores with hash.

Forming the hash:
Every time the highscores are updated (NOT just before sending them), form a very complicated string out of the scores, maybe add some chars, change order, scramble and so on, then for example use MD5 to it. Server will form the same hash out of the scores and compare it, allows if valid. That's enough security imo :D