Skip to main content

Embed Google’s Pac Man game on your own webpage

To celebrate the 30th anniversary of the most popular video game of all time, Pac Man, Google put a playable version of the game on Google’s home page on May 21. It’s no longer on the page now but I hope you did catch it at least once during the 48 hours when it was up.

Update: By popular demand, Pac Man is now available permanently on


Now a blogger over at Rustybrick put together a quick code allowing people to embed the game on their own web pages. Simply copy the code below and paste it on to your page to immortalize Google Pac Man forever.

<script>google.pml=function(){function d(a){if(!google.pml_installed){google.pml_installed=true;if(!a){document.getElementById("logo").style.background="black";window.setTimeout(function(){var b=document.getElementById("logo-l")


google.dom.append(a)}}function e(){if(document.f&&document.f.btnI)document.f.btnI.onclick=function(){typeof google.pacman!="undefined"?google.pacman.insertCoin():d(false);return false}}if(!google.pml_loaded){google.pml_loaded=true;window.setTimeout(function(){document.f&&document.f.q&&document.f.q.value==""&&d(true)},1E4);e();google.rein&&google.rein.push(e);google.dstr&&google.dstr.push(function(){google.pacman&&google.pacman.destroy();if(google.pml_installed){for(var a=(document.getElementById("xjsc")||document.body).getElementsByTagName("script"),b=0,c;c=a[b++];)c.src.indexOf("/logos/js")!=-1&&google.dom.remove(c);google.pml_installed=false}});google.pacManQuery=function(){google.nav(document.getElementById("dlink").href)}}};</script>

<form action="/search" name=f onsubmit="google.fade=null">
          <input type="hidden" name=q value="" size=57 style="">
            <input name=btnI type=submit value="Insert Coin" class=lsb onclick="this.checked=1">

            <div id=xjsd>
            <div id=xjsi>
<script>if(google.y)google.y.first=[];if(google.y)google.y.first=[];if(!google.xjs){google.dstr=[];google.rein=[];window.setTimeout(function(){var a=document.createElement("script");

if(google.timers&&google.timers.load.t)google.timers.load.t.xjsls=(new Date).getTime();},0);
var h,i,j=1,k=google.time(),l=[];google.rein.push(function(){j=1;k=google.time()});google.dstr.push(function(){google.fade=null});function m(a,f){var b=[];for(var c=0,e;e=a[c++];){var d=document.getElementById(e);d&&b.push(d)}for(var c=0,g;g=f[c++];)b=b.concat(n(g[0],g[1]));for(var c=0;b[c];c++)b[c]=[b[c],"opacity",0,1,0,""];return b}function n(a,f){var b=[],c=new RegExp("(^|\\s)"+f+"($|\\s)");for(var e=0,d,g=document.getElementsByTagName(a);d=
g[e++];)c.test(d.className)&&b.push(d);return b}google.fade=function(a){if(google.fx&&j){a=a||window.event;var f=1,b=google.time()-k;if(a&&a.type=="mousemove"){var c=a.clientX,e=a.clientY;f=(h||i)&&(h!=c||i!=e)&&b>600;h=c;i=e}if(f){j=0;google.fx.animate(600,m(["fctr","ghead","pmocntr","sbl","tba","tbe"],[["span","fade"],["div","fade"],["div","gbh"]]));for(var d=0;d<
l.length;++d)if(typeof l[d]=="function")l[d]()}}};google.addFadeNotifier=function(a){l.push(a);if(!j)a()};
;google.History&&google.History.initialize('/')});if(google.j&&google.j.en&&google.j.xi){window.setTimeout(google.j.xi,0);google.fade=null;}google.pml && google.pml();</script>
var b,d,e,f;function g(a,c){if(a.removeEventListener){a.removeEventListener("load",c,false);
a.detachEvent("onerror",c)}}function h(a){f=(new Date).getTime();++d;a=a||window.event;var||a.srcElement;g(c,h)}var i=document.getElementsByTagName("img");b=i.length;d=0;for(var j=0,k;j<b;++j){k=i[j];if(k.complete||typeof k.src!="string"||!k.src)++d;else if(k.addEventListener){k.addEventListener("load",h,false);k.addEventListener("error",
h,false)}else{k.attachEvent("onload",h);k.attachEvent("onerror",h)}}e=b-d;function l(){google.timers.load.t.ol=(new Date).getTime();google.timers.load.t.iml=f;google.kCSI.imc=d;
else if(window.attachEvent)window.attachEvent("onload",l);google.timers.load.t.prt=(f=(new Date).getTime());


[via Search Engine Roundtable]


  1. Where do you paste the code?

  2. Here is an interesting report on this Google's PAC-MAN

    Google PAC-MAN Cost Users 4.82 million hours and $120 Million

    Over the past few weeks, you might have been greeted with the Google PAC-MAN game whenever you visited The game was cute, enticing and annoying at its best, however, according to some reports from the RescueTime blog, over the span of 48 hours users spent a total of 4.82 million hours playing the game, which cost us $120 million+ in total.

    Google PAC-MAN Doodle

    According to the study done by RescueTime, an average user usually spends 4 and a half minutes on Google with 22 page views on an average with each page view timed to 11 seconds. However, according to the data they have the average user spent 36 seconds more on last Friday, the day the Google PAC-MAN game went live.

    Some of the intriguing stats from their study includes the following:

    * Google Pac-Man consumed 4,819,352 hours of time (beyond the 33.6m daily man hours of attention that Google Search gets in a given day)
    * $120,483,800 is the dollar tally, If the average Google user has a COST of $25/hr (note that cost is 1.3 – 2.0 X pay rate).
    * For that same cost, you could hire all 19,835 google employees, from Larry and Sergey down to their janitors, and get 6 weeks of their time. Imagine what you could build with that army of man power.
    * $298,803,988 is the dollar tally if all of the Pac-Man players had an approximate cost of the average Google employee.

    So how long did you spend playing PAC-MAN on Google? Oh and by the way you can continue playing the Google PAC-MAN game at its new home.

  3. do you just paste this into an html document, because this only got me the insert coin button and nothing else


Post a Comment

Popular posts from this blog

How to Record CPU and Memory Usage Over Time in Windows?

Whenever the computer is lagging or some application is taking too long to respond, we usually fire up task manager and look under the Performance tab or under Processes to check on processor utilization or the amount of free memory available. The task manager is ideal for real-time analysis of CPU and memory utilization. It even displays a short history of CPU utilization in the form of a graph. You get a small time-window, about 30 seconds or so, depending on how large the viewing area is.

Diagram 101: Different Types of Diagrams and When To Use Them

Diagrams are a great way to visualize information and convey meaning. The problem is that there’s too many different types of diagrams, so it can be hard to know which ones you should use in any given situation. To help you out, we’ve created this diagram that lays out the 7 most common types of diagrams and when they’re best used:

How to Schedule Changes to Your Facebook Page Cover Photo

Facebook’s current layout, the so called Timeline, features a prominent, large cover photo that some people are using in a lot of different creative ways. Timeline is also available for Facebook Pages that people can use to promote their website or business or event. Although you can change the cover photo as often as you like, it’s meant to be static – something which you design and leave it for at least a few weeks or months like a redesigned website. However, there are times when you may want to change the cover photo frequently and periodically to match event dates or some special promotion that you are running or plan to run. So, here is how you can do that.