A classic PacMan arcade game built in Java using Object-Oriented Programming (OOP) concepts.
- Java OOP Implementation: Demonstrates core OOP principles including:
- Encapsulation: Game logic encapsulated in separate classes
- Inheritance: Extends JPanel for custom game rendering
- Polymorphism: Different ghost behaviors through method overriding
- Abstraction: Clean separation between game logic and UI
- Navigate PacMan through a maze collecting food
- Collect power pellets to eat ghosts temporarily
- Sound effects and scoring system
- Pause/resume and restart functionality
- Arrow Keys: Move PacMan
- Spacebar: Pause/Resume
- Enter: Restart (when game over)
java -jar PacMan.jar- Compile:
javac -cp src src/*.java -d bin - Copy assets:
xcopy src\assets bin\assets /E /I /Y - Run:
java -cp bin App
- Java 8 or higher
PacMan/
├── src/
│ ├── App.java # Main entry point (JFrame setup)
│ ├── PacMan.java # Game logic (OOP implementation)
│ └── assets/ # Images and sounds
├── PacMan.jar # Executable file
└── README.md
- Language: Java with OOP Design Patterns
- GUI Framework: Swing (JFrame, JPanel)
- Resolution: 608x672 pixels
- Architecture: Object-oriented game structure
A perfect example of Java OOP in game development! 👾