News for hackers. Stuff that matters.
Re:Play PacMan at google.com Now. by mike-cardwell on Friday May 21, 2010 @11:16AM (#1367567)
Wonder how many global man hours are going to be wasted by people playing this game today ;)
Re:Play PacMan at google.com Now. by MikeCapone on Friday May 21, 2010 @11:19AM (#1367593)
I wonder if it'll show on the stock market...
Re:Play PacMan at google.com Now. by javanix on Friday May 21, 2010 @11:33AM (#1367639)
It might help ... maybe happy people can make a bit of a rally.
Re:Play PacMan at google.com Now. by mbrubeck on Friday May 21, 2010 @11:52AM (#1367708)
What Wall Street needs is a http://linerider.com/ style game on the graphs at http://finance.google.com/.
Re:Play PacMan at google.com Now. by javanix on Friday May 21, 2010 @12:03PM (#1367747)
Re:Play PacMan at google.com Now. by wizard_2 on Friday May 21, 2010 @01:49PM (#1368116)
I just played a level with my boss. I'm disappointed it doesn't load up on the droid.
[deleted]
Re:Play PacMan at google.com Now. by RodgerTheGreat on Friday May 21, 2010 @11:51AM (#1367703)
How is it ever a waste of time to read source code?
Re:Play PacMan at google.com Now. by Femur on Friday May 21, 2010 @11:10AM (#1367545)
Boy, did that surprise the heck out of me. I never worry about keeping my speakers turned up when going to google.com
Re:Play PacMan at google.com Now. by mbrubeck on Friday May 21, 2010 @03:00PM (#1368383)
Apparently this is overwhelming the Firefox support forums and chat lines:

https://support.mozilla.com/en-US/forum/1/678373

Re:Play PacMan at google.com Now. by grhino on Friday May 21, 2010 @04:54PM (#1368819)
CoolPreviews, an addon for Firefox, caused the PacMan music to play even when the user wasn't viewing google.com. They've released an update that fixes the issue.

https://addons.mozilla.org/en-US/firefox/addon/2207/

Re:Play PacMan at google.com Now. by jacquesm on Friday May 21, 2010 @07:08PM (#1369263)
Bad move by google, really. Start on a button click is one thing but auto-starting something that makes a bunch of noise on a page that has always been totally silent is really dumb.
Re:Play PacMan at google.com Now. by studer on Friday May 21, 2010 @11:22PM (#1369703)
Google doesn't autostart anything, it's a FireFox extension (Cool Previews) that loads the page in the background that causes the trouble. I suggest reading up on the real story before you start labeling things as "bad moves" and "really dumb".
Re:Play PacMan at google.com Now. by follower on Saturday May 22, 2010 @02:27AM (#1369898)
Actually, the sound does autostart when you load the page. But the playing sound in the background issue is related to the extension.
Re:Play PacMan at google.com Now. by jacquesm on Saturday May 22, 2010 @10:12AM (#1370325)
My browser is 'clean', there are no extensions or plug-ins installed besides the 'closed tabs button' and greasemonkey.

Welcome to HN by the way.

Re:Play PacMan at google.com Now. by RodgerTheGreat on Friday May 21, 2010 @11:21AM (#1367605)
If anybody's curious about the source, here's a reformatted version:

http://pastebin.com/enyeHeKg

Re:Play PacMan at google.com Now. by jah on Friday May 21, 2010 @12:38PM (#1367855)
Haha, they've even included a kill screen:

  g.level == 256 && g.killScreen()
Re:Play PacMan at google.com Now. by jah on Friday May 21, 2010 @12:58PM (#1367938)
And here it is (after a little Firebug hacking):

http://imgur.com/fNjWJ.png

Re:Play PacMan at google.com Now. by cmelbye on Friday May 21, 2010 @11:59AM (#1367736)
Only Google would write 3,162 lines of source code for something that would be on their site for 24 hours.

EDIT: You wouldn't happen to be Rodger from the nonlogic community, would you?

Re:Play PacMan at google.com Now. by petercooper on Friday May 21, 2010 @01:32PM (#1368046)
Ah, but in terms of play hours divided by development hours, this is bound to trump most indie games.
Re:Play PacMan at google.com Now. by studer on Friday May 21, 2010 @11:26PM (#1369708)
You wouldn't be prepared to write 3,162 lines of code for something with a guaranteed audience of hundreds of millions of people? What does it take for you to get out of bed? Billions of viewers?
Re:Play PacMan at google.com Now. by joubert on Saturday May 22, 2010 @08:02AM (#1370197)
How many people played it?
Re:Play PacMan at google.com Now. by eli on Friday May 21, 2010 @01:14PM (#1367983)
First 1000 lines are just the map and related data
Re:Play PacMan at google.com Now. by RodgerTheGreat on Friday May 21, 2010 @12:17PM (#1367794)
Aw, you caught me. :)

How's it shakin'?

Re:Play PacMan at google.com Now. by cmelbye on Friday May 21, 2010 @01:43PM (#1368090)
It's going well, how about you? (my nick was canuckid by the way, which will probably bring back some bad memories?;-)
Re:Play PacMan at google.com Now. by xhuang on Friday May 21, 2010 @11:42AM (#1367664)
thanks, just wondering what tools did you use to reformat it?
Re:Play PacMan at google.com Now. by RodgerTheGreat on Friday May 21, 2010 @11:50AM (#1367698)
No prob. I used http://jsbeautifier.org/ - the first google result for "Javascript Reformatter". It's a pretty spiffy little tool.
Re:Play PacMan at google.com Now. by mawhidby on Friday May 21, 2010 @03:34PM (#1368487)
On an unrelated note, as of 3:33PM EST, this story has 262 points over 4 hours, and is ranked lower than "Facebook caught sharing secret data with advertisers", which has 210 points over 16 hours (this story ranked 27, the facebook story 23). Is there a reason for this? Shouldn't this be near the top of HN?
Re:Play PacMan at google.com Now. by lhorie on Friday May 21, 2010 @04:54PM (#1368821)
FWIW, I had posted this earlier

http://news.ycombinator.com/item?id=1367899

Edit: actually it seems this post one is older. Hadn't seen it :(

Re:Play PacMan at google.com Now. by marcusbooster on Friday May 21, 2010 @11:10AM (#1367546)
Insert a second coin for Ms. Pac-Man multi-player.
Re:Play PacMan at google.com Now. by mambodog on Friday May 21, 2010 @11:19AM (#1367591)
I've no friends, so I'm just playing two-handed. Try it for an extra challenge..
Re:Play PacMan at google.com Now. by joezydeco on Friday May 21, 2010 @11:16AM (#1367572)
That's pretty hot. WASD controls Ms. Pac.
Re:Play PacMan at google.com Now. by pilif on Friday May 21, 2010 @12:17PM (#1367793)
This even works on the abomination that is IE6.

That's what they get from not using Canvas or any other technology newer than 10 years old. The game is built of 8x8 pixel DIVs.

Re:Play PacMan at google.com Now. by neovive on Friday May 21, 2010 @01:59PM (#1368158)
Maybe it was originally written for the 20th anniversary.
Re:Play PacMan at google.com Now. by rpbertp13 on Friday May 21, 2010 @11:27AM (#1367620)
Try removing ghosts with Firebug and play blind pac man!
Re:Play PacMan at google.com Now. by dunham on Friday May 21, 2010 @11:45AM (#1367675)
Aside from no sound, it works on the iPad. They seem to be handling touch events (swipes) for movement.
Re:Play PacMan at google.com Now. by zsouthboy on Friday May 21, 2010 @12:20PM (#1367801)
Sound is played using Flash, so that's why it doesn't work.
Re:Play PacMan at google.com Now. by wizard_2 on Friday May 21, 2010 @01:50PM (#1368121)
booo! why wont it load on the droid?
Re:Play PacMan at google.com Now. by bengl on Friday May 21, 2010 @02:25PM (#1368263)
Same on my Nexus One.
Re:Play PacMan at google.com Now. by ccc3 on Friday May 21, 2010 @11:18AM (#1367586)
Does this imply that nobody uses the "I'm feeling lucky" button?
Re:Play PacMan at google.com Now. by inerte on Friday May 21, 2010 @11:26AM (#1367614)
Nobody uses the I'm feeling luck button. I remember Marissa Mayer saying so and here are some links http://www.google.com/search?hl=pt-BR&safe=off&clien...
Re:Play PacMan at google.com Now. by moskie on Friday May 21, 2010 @11:54AM (#1367712)
I find it very useful to use as a search destination for the address bar.

For example, in Chrome, add this as one of the Search Engines in the options dialog: http://www.google.com/search?q=%s&btnI=Im+Feeling+Lucky

I've associated that with the keyword "gg"

Now, when I go to the address bar and type a query whose first Google result I am confident will be the destination I want, I've got a great way to get there.

Example:

"gg imdb Forest Gump"

Will get me to IMDB's Forest Gump page. So you can pretty much imagine the power here, especially for reference sites. Type the site name and the query, and you'll end up where you want to be.

Re:Play PacMan at google.com Now. by trezor on Friday May 21, 2010 @01:04PM (#1367959)
If you want reference sites, why not just add them directly?

Most of those sites has an opensearch provider.

Re:Play PacMan at google.com Now. by bkudria on Friday May 21, 2010 @02:10PM (#1368202)
You should use http://yubnub.com, which will let you just type "imdb Forest Gump", among many, many, many other things.
Re:Play PacMan at google.com Now. by crystalis on Friday May 21, 2010 @02:57PM (#1368373)
Why? His solution automatically works for anything, and your site doesn't even appear to be up at the time of writing.
Re:Play PacMan at google.com Now. by kingkilr on Friday May 21, 2010 @11:23AM (#1367608)
I don't think so, didn't google publish that they "lose" 60 million USD or something beaues people click it and don't see ads :)
Re:Play PacMan at google.com Now. by zandorg on Friday May 21, 2010 @12:16PM (#1367786)
The goodwill from that is probably worth more than $60,000,000!
Re:Play PacMan at google.com Now. by josefresco on Friday May 21, 2010 @11:33AM (#1367640)
Google is replacing the need for the "I'm feeling lucky" button with their auto-complete system. It's the same effect as the button but is shown in the auto-complete field while the user is typing.

This has the same side effect for Google regarding ads as does the button. Although if a user wants to be taken directly to website ABC they prob aren't a good audience for ads.

Re:Play PacMan at google.com Now. by logic on Friday May 21, 2010 @12:09PM (#1367761)
Nope. Unless, of course, you're googling "Do you feel lucky, punk?".

http://www.google.com/search?hl=en&site=&q=do+you+fe...

Re:Play PacMan at google.com Now. by timcederman on Friday May 21, 2010 @01:28PM (#1368034)
The one that appears after you start typing?
Re:Play PacMan at google.com Now. by volida on Friday May 21, 2010 @11:22AM (#1367606)
and saves a lot of money for Google too
Re:Play PacMan at google.com Now. by jazzychad on Friday May 21, 2010 @12:45PM (#1367892)
I wonder how much of the code was inspired by Neven Mrgan's PieGuy iphone webapp game, also written in html/js.

http://mrgan.tumblr.com/post/257187093/pie-guy

http://mrgan.com/pieguy/ <-- go here on your iphone

Re:Play PacMan at google.com Now. by timf on Friday May 21, 2010 @11:58AM (#1367726)
Would be awesome to see a high score list.
Re:Play PacMan at google.com Now. by yanowitz on Friday May 21, 2010 @11:11AM (#1367552)
Best. Logo. Ever.
Re:Play PacMan at google.com Now. by ashishbharthi on Friday May 21, 2010 @11:19AM (#1367588)
Time has come for interactive Google Logos. This will be so much fun.
Re:Play PacMan at google.com Now. by soundlab on Friday May 21, 2010 @12:13PM (#1367778)
This is great, except for that some element of Google (address bar search?) is running in the background of my firefox browser and the siren audio is on a continuous loop even after leaving Google. No add-on or plug-in I remove helps.
Re:Play PacMan at google.com Now. by harry on Friday May 21, 2010 @12:27PM (#1367816)
I hope I'm not the only one offended that the ghosts don't act like their pacman counterparts. Red is such a puss in google land!
Re:Play PacMan at google.com Now. by mcav on Friday May 21, 2010 @11:10AM (#1367544)
<incorrect> And here I thought that Google had implemented PacMan in HTML5 on their logo, given their presentation at Google I/O. </incorrect>

EDIT: I didn't see that you had to click "Insert Coin" to start.

Re:Play PacMan at google.com Now. by chaosmachine on Friday May 21, 2010 @11:19AM (#1367590)
It's implemented with javascript and html, but they're using Flash for sound.
Re:Play PacMan at google.com Now. by bd on Friday May 21, 2010 @01:35PM (#1368055)
Unfortunately Flash is currently pretty much unavoidable if you want sound effects in JS games.

I experimented with <audio> tag in HTML5 game few days ago: it's fine for media player type applications (where you play longer sounds with looser coupling to user actions), but it's not there yet for games (implementation-wise, API is ok).

If you need to play a lot of tiny sounds in rapid response to player actions, you are going to get random weird behaviors and cross-browser inconsistencies: noticeable lags, cracking noises, cuts and repetitions.

Re:Play PacMan at google.com Now. by phoboslab on Friday May 21, 2010 @02:32PM (#1368297)
This seems to be heavily depended on the file types you use. I have some experiments with many different, short, sound files running with <audio> just fine - in Chrome, FF and Opera at least.

Ogg Vorbis and (of course WAV) works quite nice, MP3 doesn't. For Safari, maybe AAC would be the right choice. Still, as you said, the <audio> implementation is quite buggy at times. But I have no doubt it will get better!

Re:Play PacMan at google.com Now. by bd on Friday May 21, 2010 @03:32PM (#1368483)
Yes, a good point. I confirm, also in my experience problems are very dependent on particular sound files. Some work perfectly fine, some make troubles.

And it's not just encoding, it seems to be dependent also on what's inside the sound file like a particular waveform or length.

For me the worst were a sequences of very short sounds (fractions of second) played in a direct response to rapid successive keypresses (keydown-keydown-keydown should make pew-pew-pew). No matter what I did, there was always at least one browser with some showstopping bug.

Re:Play PacMan at google.com Now. by ericz on Friday May 21, 2010 @11:17AM (#1367574)
That's not what they did?
Re:Play PacMan at google.com Now. by ugh on Friday May 21, 2010 @11:19AM (#1367589)
They don’t use canvas, just a lot of divs and javascript.
Re:Play PacMan at google.com Now. by kacy on Friday May 21, 2010 @11:20AM (#1367598)
It works on the iPhone too. Type in the address in Safari, then click Classic mode at the bottom of the screen. ^_^
Re:Play PacMan at google.com Now. by indrax on Friday May 21, 2010 @04:09PM (#1368628)
This is going to spike their time-on-front-page statistics.
Re:Play PacMan at google.com Now. by enterneo on Friday May 21, 2010 @12:03PM (#1367748)
I love pacman, but still the game should NOT start automatically (the sound is really irritating).
Re:Play PacMan at google.com Now. by follower on Friday May 21, 2010 @01:02PM (#1367954)
If you want to remove the sound use this bookmarklet which deletes the iframe used to load the Flash file:

javascript:(function(){var rancidbacon={};try{rancidbacon.com=document.getElementsByName("pm-sound")[0];rancidbacon.com.parentElement.removeChild(rancidbacon.com);}catch(_){}})()

More details here: http://stuff.rancidbacon.com/google-pacman/

Re:Play PacMan at google.com Now. by jacquesm on Friday May 21, 2010 @07:06PM (#1369256)
I agree with that. By accident the volume on this machine was still way up from watching a movie, and it must have woken up the whole damn building.
Re:Play PacMan at google.com Now. by neovive on Friday May 21, 2010 @01:58PM (#1368148)
NoScript blocked the googleusercontent.com by default, so I didn't even realize there was sound until reading this discussion.
Re:Play PacMan at google.com Now. by pclark on Friday May 21, 2010 @11:45AM (#1367678)
at least it isn't flash.

how senior did the approval have to be to get this allowed, do you think?

Re:Play PacMan at google.com Now. by jacquesm on Friday May 21, 2010 @05:29PM (#1368942)
It's partially flash.
Re:Play PacMan at google.com Now. by jeiting on Friday May 21, 2010 @11:34AM (#1367642)
I would like to see how many millions google makes by disabling the I'm Feeling Lucky button today.
Re:Play PacMan at google.com Now. by Mark_B on Friday May 21, 2010 @12:04PM (#1367753)
Anybody know how to save the page off for posterity? A simple "Save Page As" didn't seem to work.
Re:Play PacMan at google.com Now. by snprbob86 on Friday May 21, 2010 @12:11PM (#1367770)
It will probably show up in the archive at:

http://www.google.com/logos/index.html

Re:Play PacMan at google.com Now. by oilfieldtrash on Saturday May 22, 2010 @04:43PM (#1371021)
What's the matter with you guys? THe PacMan thing was great. What a fun surprise. I've been to Google now 10 times in the past two days-- and I usually only use their serach engine once or twice a day. Stopped me from going to dogpile......
Re:Play PacMan at google.com Now. by operandx on Sunday May 23, 2010 @01:03PM (#1372574)
I've uploaded a copy of the Google PAC-MAN Doodle here:

http://operandx.com/GooglePacman/Play.html

Enjoy!

Re:Play PacMan at google.com Now. by neovive on Friday May 21, 2010 @01:56PM (#1368139)
Someone needs to publish a revised PacMan strategy guide for getting around all those extra obstacles. Should you get pellot inside the G at the start or end?
Re:Play PacMan at google.com Now. by WillyF on Friday May 21, 2010 @12:33PM (#1367838)
I'd love to see the analytics on their home page for today.
Re:Play PacMan at google.com Now. by sjs382 on Friday May 21, 2010 @03:15PM (#1368426)
Average time on site: 3 hours.

(no, not really)

Re:Play PacMan at google.com Now. by minalecs on Friday May 21, 2010 @11:49AM (#1367697)
I think we are all missing the point, that its <b> Pac-Man's 30th anniversary </b>. But yes the playable logo, just adds to the awesomeness
Re:Play PacMan at google.com Now. by castis on Friday May 21, 2010 @01:15PM (#1367990)
I dont know why, but I'm really happy this exists.
Re:Play PacMan at google.com Now. by xephris on Friday May 21, 2010 @11:31AM (#1367633)
Works on Android as well! But not BlackBerry.
Re:Play PacMan at google.com Now. by ukdm on Friday May 21, 2010 @11:21AM (#1367600)
I found a bug... collected a pill as a previous one's time allotment was ending and it didn't register in the game.
Re:Play PacMan at google.com Now. by naqeeb on Friday May 21, 2010 @03:28PM (#1368471)
Too bad they didn't modify Pacman so that the ghosts have an apple logo and the pellets are Android phones.
Re:Play PacMan at google.com Now. by someone_here on Friday May 21, 2010 @11:27AM (#1367621)
Well there goes my day.
Re:Play PacMan at google.com Now. by dryicerx on Friday May 21, 2010 @03:20PM (#1368448)
Just imagine the productivity drop around the world...
Re:Play PacMan at google.com Now. by heresy on Friday May 21, 2010 @08:53PM (#1369471)
I woke up to my girlfriend playing this.

Awesome :)

Re:Play PacMan at google.com Now. by rawat81 on Friday May 21, 2010 @11:51AM (#1367704)
May be Google will dish out there own anti spyware & antivirus for chrome next.

I liked the plain old google page .. simple

Re:Play PacMan at google.com Now. by scorpion032 on Friday May 21, 2010 @12:39PM (#1367860)
9030.

My score.

Re:Play PacMan at google.com Now. by l4u on Friday May 21, 2010 @01:31PM (#1368041)
it lowers my productivity :( but it's fun
Re:Play PacMan at google.com Now. by dayjah on Friday May 21, 2010 @06:21PM (#1369126)
love this!