0

I want to make a website with flash games which I make with highscores, and I am using this code to post the scores to a php file:

submit.onPress = function () {
getURL ("highscore.php", "_blank", "POST"); }

Basically there is a submit button and when you click it it opens a new tab which is actually a php file where it says like Your score is 12 . My problem is how to protect this from people cheating and maybe sending false highscores? If anyone has any idea please tell me...

Luka
  • 187
  • 3
  • 9
  • 1
    It's very difficult to do this in a foolproof way without running the game on the server. But one thing you can do to make it harder to cheat is to encrypt the score before posting it. – towr Feb 23 '14 at 18:55
  • Well the game would be on the same server, I would personally make it and add it to my own server :) Also could you give me a code how to encrypt from as2, because i only found from as3, and i am using as2 now, or link me to some forum or tutorial if you can – Luka Feb 23 '14 at 19:02
  • I've only found http://www.yuniti.com/As2RSA for AS2 so far. Another option might be to use some sort of prove-of-performance, i.e. you don't just keep a score, but some other data that can only (with high certainty) be obtained if you actually played the game fairly. (In the simplest form, it could be the whole user-action history, but that might be a bit too much data, depending on the game.) – towr Feb 23 '14 at 19:27

3 Answers3

0

you need to encrypt the variable add subtract multiply etc the score and add false numbers that are the same as the real number. Then when you need the score decrepit the file and frequently if you can update the game when the game has launched and change the decryption.

cheat engine and other flash cheat engines example: buy something or change their score any var that changes at the time the cheater changes the var, he will have a list of variables that changed that instance, so you need to prevent this by having multiple vars acting as the score or having a timer counting up or down, and even both make sure to have multiplication and division in the encrypted variable you need it!

CSchulz
  • 10,882
  • 11
  • 60
  • 114
Shadow
  • 1
0

This I think has already been answered by this post: Flash Encryption PHP Decryption However you would also probably want to add a Blowfish which makes it more difficult but by no means impossible to hack

Community
  • 1
  • 1
EdL
  • 415
  • 4
  • 12
0

var Score = 0; var addScore = 0;

//high score you earn 20 point example you need to put logic in this :)

addScore = 20

//client Score = addScore * 3 + 23;

//server

Score = addScore - 23 / 3;

Shadow
  • 1