ON-LINE highscore

Started by
7 comments, last by pex22 19 years ago
Hi! How can I make comunication between on-line highscore table(represented by PHP script on server) and my game? How did I call PHP script from my game? (which function)
Advertisement
Upload the highscore file to the server.
then code a bit to make sure this is your game highscore and not a fake.
and have SQL or text file to keep the highscore information in your server.
dont forget to delete the loaded highscore file in the end!
and in the highscores page, just open the text file or sql database and read the information.

by the way, i would let the users upload the highscore from the game itself and not (only) from the website! (im just hopping everygame would do that)
pex.
Its not possible for you to control the client side code. thus cheating the high score will happen regardless of if you code something nifty....they will just remove it if they really want that high score.
I brought this up a while ago and a couple of people suggested libcurl.
Rob Loach [Website] [Projects] [Contact]
A simple way for you to make cheating difficult is to include a hash in the highscore file. You can easily find an implementation of MD5 or SHA-1 in whatever language you use. Then just append a hash of the highscoredata itself, plus some "secret" data that the cheaters will have to reverse engineer all your code to get at. Ie if your highscore file is

name1,42,name2,20

you calculate MD5( "name1,42,name2,20SECRETDATA" )

and upload the data+hash:

name1,42,name2,20
13f6603225bf15b0f4f3fffc33f2c4ba

On the server you perform the same calculation, and compare the hashes.
Even with some kind of secret data, the cheater can just hack the game in a way that gives them an advantage (like making themself invincible) and then they would still have a legitimate hash when they submit their score.
Even with some kind of secret data, the cheater can just hack the game in a way that gives them an advantage (like making themself invincible) and then they would still have a legitimate hash when they submit their score.
Yeah might be a good idea to send other parts in the hash file, like the players lowest life, and his highest life at any point in the game.

That way you can spot cheaters, knowing it *should* be impossible to get on the high score table when your health never dropped

The only thing thats really a pain in the ass is when they use the system clock time slowers, so they can make the game run super slow, and they can play the game perfectly.

I think the only way to get around that hack is to test the system clock speed. But I have no idea how to test it it's being slowed down.
Black Sky A Star Control 2/Elite like game
in Icy Tower, you send your records to the highscore uploader, so they can watch it and see if it is a fake or not.
if it isnt, you just add it to the highscore.
but it is not useful for all the games.
pex.

This topic is closed to new replies.

Advertisement