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

https://github.com/julianamancera/pacman

mini game since im bored (im actually tired)
https://github.com/julianamancera/pacman

Last synced: about 2 months ago
JSON representation

mini game since im bored (im actually tired)

Awesome Lists containing this project

README

        


PacMan🕹️




PacMan GIF

## Overview
This is a simple Pac-Man game built using **Java** and the **Swing** framework. The game features a Pac-Man character navigating a maze, collecting food pellets while avoiding ghosts. The game implements collision detection, random ghost movement, and a scoring system.

## Features
- **Classic Pac-Man Gameplay:** Navigate the maze and eat all the food pellets.
- **Ghost AI:** Ghosts move randomly and can collide with Pac-Man.
- **Score System:** Gain points by collecting food pellets.
- **Lives System:** Lose a life if caught by a ghost, with game over when lives reach zero.
- **Custom Controls:** Move Pac-Man using the **WASD** keys.
- **Collision Detection:** Walls and ghosts interact correctly with Pac-Man.

## Controls
| Key | Action |
|------|--------|
| W | Move Up |
| S | Move Down |
| A | Move Left |
| D | Move Right |

## How to Run
1. Ensure you have **Java 17 or later** installed.
2. Clone or download the project.
3. Compile the Java files:
```
javac PacMan.java PacManGame.java
```
4. Run the game:
```
java PacManGame
```
## Game Logic
- Pac-Man moves in four directions.
- Walls block movement.
- Food increases the player's score.
- Ghosts move randomly; colliding with one reduces a life.
- The game restarts if all food is eaten.

## Future Improvements
- Implement smarter ghost AI (e.g., pathfinding).
- Add power-ups for Pac-Man.
- Improve graphics and animations.


Enjoy the game! 🕹️


Game