This is a semester project for the GUI (OOP) course.
A recreation of the 1980 arcade original in Java Swing, with no external libraries. The maze, sprites and font come from the original assets.
It's Pac-Man. You know how to play Pac-Man.
| Key | Action |
|---|---|
| Arrow keys / WASD | Move |
| Esc | Pause |
| Enter | Confirm |
The menu takes arrow keys or W/S, with Enter to select.
- Rendering — Swing
JLayeredPanewith a tile layer beneath a sprite layer - Game loop — fixed 60 FPS on its own thread, with separate daemon threads for the power-pellet timer and ghost release
- Movement — pixel movement on a 28×36 grid with centre snapping, so turns only register when a character is aligned to its cell
- Ghosts — each of the four has its own targeting rule mimicking the original game
- Maze — built in Tiled and exported to CSV, parsed at startup
- Hi-scores — top ten persisted to disk via Java serialisation, with arcade-style name entry
- Audio —
javax.sound.sampledclips for chomp, death, ghost-eaten and round start
Note: Two-player mode appears in the menu but was never implemented, so it's greyed out. It's an unfinished recreation with a few known bugs, like, eaten ghosts tend to get stuck in the pen, while Blinky never goes into the pen at all. It's at the state I submitted it at, bugs included.
Clicking the banner on the title screen flips it between the retro and modern Pac-Man logos.
Sprites are from the original 1980 Namco release, used here for a non-commercial student project.
