Hacker News new | past | comments | ask | show | jobs | submit login
Google Pacman Code (macek.github.com)
56 points by Chirag on May 25, 2010 | hide | past | favorite | 28 comments



If you're smart enough to use Github, you're smart enough to understand that "source code I can easily copy" does not mean "source code I am allowed to use if it is cool enough".


Agreed, but it seems unlikely that Google will actually care. Namco might, though.


We care, it's not open source, so it shouldn't be treated as such.


http://github.com/macek/google_pacman/blob/master/README

Here you go. Looks like it's okay to play offline yourself or online using their hosted version.


Probably I'm not smart enough, but I cannot find the license this was released under. So what I am NOT supposed to do with the code?


If there is no license attached, then standard US copyright applies to it. In short: all rights are reserved to the original author (Google Inc.) and you're not allowed to reproduce the text anywhere.

Of course, then you get into Fair Use and private use, and a million other legal conundrums. But, yeah, not open source.


I bet it's only an email away to be opensourced...


Namco has used the Pacman franchise for a lot, even the original version. It's not even close to the ethical grey-area of abandonware (but not legal-grey, abandonware is still considered copyright violation, it's just not expected to be enforced). The Wikipedia article linked seems to indicate that the original Google version was an authorized clone, but that doesn't make any copies and extensions that you make off of it authorized. There are so many minefields on this, and such games are so easy to make, that you might as well just leave this well enough alone.


And for those of you who just want to play and not bother with the source, Google still hosts the game "legally" at :

http://www.google.com/pacman/


Could this be the start of Google getting into casual online gaming? Take on facebook?


No.


I wouldn't be so confident.

What's the logical extension to Google TV?

Yes, Google Games Console.


Heh, would be interesting if it was. They have such an obviously wide reach that it would probably work, too. Makes me wonder why their social networking attempts have failed.


Probably because they seem to have assumed people go on facebook to be social. So they've tried to emulate that with wave and buzz.

"it turns out" people go on facebook to play casual games often.

All Google need is to make a farmville type thingy, or make a platform on which someone else can make a farmville type thingy. Then they're in business.


ah! They put the blind side in. Neat.


The blind side?



What, seriously?!


yes, at line 2225 (which is only viewable at rawmode on git): g.level == 256 && g.killScreen()

killscreen creates the blind side


Check out a Google Pacman Level Editor. http://www.youtube.com/watch?v=_Jj3-NGO7xo


Is it no longer fashionable to put comments in source code, or is that like asking Jackson Pollock to explain each blob of paint?


Wild guess (I've never programmed Javascript (pathetic, I know)): They've used something like http://code.google.com/closure/ on it to make it more efficient, and any comments have been "optimized" away together with the intentions behind the web as a text based, open, readable format.

That way they can make sure HTML5 really IS the next Flash, i.e. so unreadable that it might as well be a proprietary format. Your source code will be safe from prying, learning (i.e. stealing) eyes.


Well, that link (http://code.google.com/closure/) invites one to "Try the Closure Compiler", leading here: http://closure-compiler.appspot.com/home

So I pasted in the source (http://macek.github.com/google_pacman/src/js/pacman10-hp.3.j...), and tried a couple of the optimization levels. The first squeezes whitespace, the third mangles everything ("Saved 41.37% off the original size (17.94% off the gzipped size)").

But the original is pretty clean, readable source code. It even uses spaces for indentation. Clearly not the output of an optimizer. Code lines such as "g.currentDotEatingSpeed = g.levels.dotEatingFrightSpeed * 0.8;" are better than possibly-out-of-sync comments.


According to the README, it seems like the nicely formatted version has been cleaned up before it was posted on github. ("Thanks to: SteD for providing a nicely formatted version of pacman10-hp.2.js)

/I'll stop talking about things I know nothing about now...


I also dislike binary blobs, or obfuscated 'source', and hadn't tried the optimizer before (thanks for the link, btw), so I gave it a shot.

But this one is the 'real' source. The mangled version is being served over at the now permanent URL (http://www.google.com/pacman , http://www.google.com/pacman/pacman.2.js), doing its job of saving bytes/watts.


This might be good for giving kids a first taste of programming - a working game and a quick edit cycle.


I think Google wouldn't have written all this in native JavaScript. GWT (Google Web Toolkit) might have been used.


> google.browser.engine.IE = false

Tsk, tsk. Browser detection instead of feature detection. ;\




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: