Prajowola.
Let's Talk
Back to Projects

Source code

Pac-Man

A compact maze muncher with three difficulty levels and power pellets that flip the chase — eat a big pellet and the ghosts turn blue and edible for a few seconds.

Built with

HTMLCSSJavaScript (Canvas)

The download is a single self-contained .html file — all the markup, styling, and game logic live in one place, with no libraries or build tools.

Main features

  • Three difficulties that change ghost speed, count, and intelligence.
  • Power pellets that frighten the ghosts and let you eat them for bonus points.
  • Grid maze with pellet counting, score, and chasing ghost AI.

How to run it on your device

  1. 1. Click Download source code above to save the .html file.
  2. 2. Double-click the file (or right-click → Open with → your browser).
  3. 3. The game runs instantly — no installation, no internet connection needed.
  4. 4. Want to peek inside? Open the same file in any text editor to read and tweak the code.