Snake Pro
-migrated-
Snake Pro Posted on: 12/29/2010 11:24pm
Quote Post
Hi all, my friend recently made a game called 'snake pro' on facebook:
http://apps.facebook.com/snake_pro/?ref ... ks&count=0

As you can try, you can easily use cheat engine to change the score and length. But the thing is, he had some way of evaluating the scores and see if it makes sense. For example, if you just change the score to 8000000 and finish the game, the game wouldn't process it as a 'valid score' and store it in highscore list. I tried changing the score, length, and time duration to make it look like actual game was played but still the game wouldn't take it as 'valid score.'

So, I tried using Sothink SWF Decompiler (first time using it) and managed to decompile the swf. So far, I'm guessing the evaluation process takes place in GameOver function. (snake.swf->action(46)->main, line 393)

Code: [Select]
protected function gameOver(event:Event) : void
        {
            this.end = new Date();
            Mouse.show();
            this.inGame = false;
            this.gameOverText.text = GameObjectManager.Instance.getGameOverText();
            this.timeElapsedText.text = this.getTimeDifference(this.start, this.end);
            this.stageNameText.text = "Stage: " + this.getStageName(this.currentLevel);
            this.performExternalCall();
            return;
        }// end function

        protected function performExternalCall() : void
        {
            var _loc_1:* = GameObjectManager.Instance.score;
            var _loc_2:* = Math.floor(Math.random() * 996) + 5;
            var _loc_3:* = Math.floor(Math.random() * 2001);
            var _loc_4:* = (_loc_1 + _loc_2) * _loc_3;
            ExternalInterface.call("recordScore", this.currentLevel, _loc_4, _loc_3, this.timeRecord, _loc_2, _loc_1);
            return;
        }// end function

also I found raw code of this at line 2413. I'm guessing something is going on in ExternalInterface.call function, but I have no idea how to access it. Can anybody help???
Re: Snake Pro Posted on: 12/31/2010 11:26am
Quote Post
No idea on how to view the external call (packet sniffing maybe?) but this should be enough to get you a legitimate looking highscore.

Only die by hitting walls
d0 20 68 10 f0 ?? ?? 27 48 -> 02 02 02 02 02 02 02 26 48

GameObjectManager -> checkCollisions()
Code: [Select]
this.grid = null;
return false;

If you're wondering, the person with the possible top highscores was me (Ben Stone, though that's just a fake facebook account)