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)
- Host: GitHub
- URL: https://github.com/julianamancera/pacman
- Owner: JulianaMancera
- Created: 2025-03-27T07:20:09.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2025-03-27T07:55:49.000Z (about 2 months ago)
- Last Synced: 2025-03-27T08:39:22.344Z (about 2 months ago)
- Language: Java
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
PacMan🕹️
![]()
## 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! 🕹️
![]()