
Google Pacman Code - Chirag
http://macek.github.com/google_pacman/
======
patio11
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".

~~~
mavroprovato
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?

~~~
ComputerGuru
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.

------
moron4hire
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.

------
Maven911
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/>

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

~~~
someone_here
No.

~~~
axod
I wouldn't be so confident.

What's the logical extension to Google TV?

Yes, Google Games Console.

------
waffenklang
ah! They put the blind side in. Neat.

~~~
Tichy
The blind side?

~~~
yellowbkpk
Last paragraph of this section: <http://en.wikipedia.org/wiki/Pac-Man#Split-
screen>

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

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

~~~
gahahaha
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.

~~~
ableal
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...](http://macek.github.com/google_pacman/src/js/pacman10-hp.3.js)),
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.

~~~
gahahaha
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...

~~~
ableal
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.

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

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

------
apphacker
> google.browser.engine.IE = false

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

