14

I was wondering, how was the PacMan game on Google.com implemented?

Javascript?

skaffman
  • 398,947
  • 96
  • 818
  • 769
zengr
  • 38,346
  • 37
  • 130
  • 192

4 Answers4

27

JavaScript with HTML for the graphics (no canvas, but sprite divs etc). There is also a bit of flash for the music.

Here is the master sprite: alt text

Community
  • 1
  • 1
cherouvim
  • 31,725
  • 15
  • 104
  • 153
  • 7
    I may disagree with their methods from time to time, but the people at Google are some serious studs. – Alan May 23 '10 at 07:29
  • 1
    Yea, considering the time invested into this. They are truly awesome when if comes to doing things differently! But again, I am also not a big fan of Google! – zengr May 23 '10 at 07:32
  • 1
    makes me want to program a platform game in javascript... – cherouvim May 23 '10 at 07:40
6

I had a quick look at the Google homepage HTML, and found a link to this JavaScript script:

/logos/js/pacman10-hp.3.js

So I'd say yes, it's implemented in JavaScript.

stakx - no longer contributing
  • 83,039
  • 20
  • 168
  • 268
4

Here is the complete javascript code. You might want to run it through a Javascript Beautifier. It's too long to post here.

Eric
  • 95,302
  • 53
  • 242
  • 374
  • I found this: http://stackoverflow.com/questions/2884064/howto-download-local-copy-of-googles-pacman-game/2886890#2886890 – zengr May 23 '10 at 07:28
3

Yes, Javascript and Html. A rewritten version can be found on GitHub.

MKroehnert
  • 3,637
  • 2
  • 34
  • 43