Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pac-Man

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.

Gameplay

It's Pac-Man. You know how to play Pac-Man.

Controls

Key Action
Arrow keys / WASD Move
Esc Pause
Enter Confirm

The menu takes arrow keys or W/S, with Enter to select.

Implementation notes

  • Rendering — Swing JLayeredPane with 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
  • Audiojavax.sound.sampled clips 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.

Screenshot

Pac-Man gameplay

Easter egg

Clicking the banner on the title screen flips it between the retro and modern Pac-Man logos.

Credits

Sprites are from the original 1980 Namco release, used here for a non-commercial student project.

About

A recreation of the 1980 arcade original in Java Swing

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages