Search This Blog

Sunday, September 5, 2010

Google Pacman

07:38:40AM, 05/09/10 AEST-09:06:00PM, 05/09/10 AEST

I first got on to this when I googled Google. Some of the results were Google Pacman. Wow I thought, an online implementation of Pacman-by Google?

So I followed it (http://www.google.com/pacman) and started playing. It's a Google logo, yet interactive. Intead of I'm Feeling Lucky it has Insert Coin. Pressing Insert Coin in the middle of a game, will restart and bring up Pacman and Mrs. Pacman allowing two-player co-op.

My highscore is 11760. But, I bet some of you could beat that.

Now, this was a few days ago. Just before writing this post, I had the sudden idea to analyse the game. A Google Chrome extension called Pendule is a web developer tool. It is fantastic, I suggest you try it.

So, I used Pendule to analyse the source code first.

Then, I used the in-built JavaScript Console in Google Chrome (see my previous post entitled Google Chrome Review for more info). I also, did a resource track and the game restarted.


<html onmousemove="google&&google.fade&&google.fade(event)">




Was the beginning tab for the HTML code. Now, I'm not sure what this means, as I haven't studied deep enough into HTML to know (I'm mainly in native development). However, feel free to comment if you know. 


This happens quite alot in these types of examinations (especially JavaScript libraries that link into the HTML). That is the fun of it, studing it and learning how to interact with it.


So then, I used the JavaScript console to debug and wow! As I type this sentence (08:59:00AM AEST) there is 455 and growing fast errors of this:


Uncaught TypeError: Cannot read property 'style' of undefined.


So just a matter of seconds after typing that error, I paused the script execution-and the errors stopped growing. I paused it at 834 errors (all the one type, just 834 different instances of them). 


Well, I strongly recommend you download the latest version of Google Chrome and install it. Then, go to some interesting site and examine it.


It is very rewarding.

No comments:

Post a Comment