An open API service indexing awesome lists of open source software.

https://github.com/itsjomon/pacman-game

A simple pacman game using java awt/swing graphics.
https://github.com/itsjomon/pacman-game

java mini-project pacman-game swing

Last synced: over 1 year ago
JSON representation

A simple pacman game using java awt/swing graphics.

Awesome Lists containing this project

README

          

# Pac-Man Game
A simple Pac-Man game built in Java using the Swing library. Navigate Pac-Man through the maze, collect food, and avoid ghosts. The game ends when you lose all your lives.

### Prerequisites
- **Java JDK**: Version 8 or later.
- **Development Environment**: VS Code, IntelliJ IDEA, Eclipse, or any Java-compatible IDE.

## Getting Started

### Clone the Repository
Run the following commands to clone and navigate into the project:

```bash
git clone https://github.com/itsjomon/pacman-game.git
```
```bash
cd pacman-game
```

-or-

### Fork the Repository
1. Fork this repository on GitHub.
2. Clone your fork.

```bash
git clone https://github.com/your-username/your-forked-repository-name.git
```
```bash
cd your-forked-repository-name
```

Set Up the Assets: Place all required images (e.g., `wall.png`, `pacmanUp.png`, etc.) in the `assets` directory located in the project root.

Compile and Run: Compile and run the program using your IDE or terminal: `javac App.java` `java App`

## Controls
- **Arrow Keys:** Move Pac-Man (Up, Down, Left, Right).
- **Restart:** After Game Over, press any key to restart.

> [!NOTE]
> - Ensure all image files are correctly placed in the `assets` directory.
> - The ghosts currently move randomly.

## Folder Structure

The workspace contains two folders by default, where:

- `src`: the folder to maintain sources
- `lib`: the folder to maintain dependencies

Meanwhile, the compiled output files will be generated in the `bin` folder by default.

> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there.

## Dependency Management

The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies).

## 🌟 *Don’t Forget to Star!*
If you find this project useful, please consider giving it a star ⭐. It helps others discover it too!