https://github.com/namelessproj/java_pacman
A PacMan game written in Java
https://github.com/namelessproj/java_pacman
java pac-man pac-man-game pacman pacman-game
Last synced: 11 months ago
JSON representation
A PacMan game written in Java
- Host: GitHub
- URL: https://github.com/namelessproj/java_pacman
- Owner: NamelessProj
- License: mit
- Created: 2025-05-19T19:22:09.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-05-24T09:18:34.000Z (about 1 year ago)
- Last Synced: 2025-06-12T08:11:28.957Z (about 1 year ago)
- Topics: java, pac-man, pac-man-game, pacman, pacman-game
- Language: Java
- Homepage:
- Size: 56.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pac-Man Java
This project is a simple reimplementation of the classic **Pac-Man** game in Java, using Swing for the graphical interface.
## Features
- Move Pac-Man with the arrow keys
- Randomly moving ghosts
- Collectible dots and bonus cherries
- Score, lives, and level management
- Pause (Space key) and restart (R key)
## Controls
- **Arrow keys**: Move Pac-Man
- **Space**: Pause / resume the game
- **R**: Restart the game after Game Over
## Requirements
- Java 17 or higher
- Maven
## Installation and Running
1. Clone this repository
```bash
git clone https://github.com/NamelessProj/Java_PacMan.git
```
2. Navigate to the project directory:
```bash
cd Java_PacMan
```
3. Run the following command to build the project:
```bash
jar -cvf PacMan.jar src/main/java/com/example/pacman/*.java
```
4. Run the game using the following command:
```bash
javaw.exe -jar PacMan.jar
# or
java -jar PacMan.jar
```
## Resources
Game images must be placed in `src/main/java/images/`:
- `pacmanRight.png`, `pacmanLeft.png`, `pacmanUp.png`, `pacmanDown.png`
- `blueGhost.png`, `orangeGhost.png`, `pinkGhost.png`, `redGhost.png`
- `wall.png`, `cherry.png`
## Licence
This project is licensed under the MIT License. See the [`LICENCE`](./LICENCE) file for details.