Google PacMan source and files : javascript
Woo! I was working on pulling out something like this together yesterday morning, but gave up after a little while. Run the JS through a beautifier, and there are interesting things to look at.