Skip to content

A simple PacMan game built in Java Swing that demonstrates Object-Oriented Programming concepts. Perfect for learning fundamental game development principles, state management, collision detection, and event handling with a classic arcade game example.

Notifications You must be signed in to change notification settings

sahedulislamrony/pacman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎮 Pacman Game in Java

Welcome to the Pacman Game in Java, a fully functional Pac-Man clone built using Java and Java Swing. This project follows a structured approach with routing, state management, and a dynamic game environment.

📚 Introduction

This game brings the classic Pac-Man experience to life with smooth controls and a well-structured architecture. Users can navigate Pac-Man through a maze while avoiding ghosts and collecting points.

✨ Features

  • Full Pac-Man Game implemented using Java and Java Swing.

  • AppRouter to manage page navigation and state transfer.

  • GameData class to distribute data using a Consumer-Listener model.

  • Modular Architecture with separate classes for Block, GameMap, etc.

  • Smooth Player Controls using arrow keys.

  • Multiple Pages:

    • Welcome Page
    • Game Page (Main Pac-Man Game)
    • Game Over Page
    • Settings Page (WIP)
    • Profile Page (WIP)

    ✨ Play Game On Windows 🎉

    Download .exe file from the official GitHub Repository

⚙️ Game Controls

Key Action
⬆️ Move Up
⬇️ Move Down
⬅️ Move Left
➡️ Move Right

🔮 Upcoming Features

  • Optimized Routing System for better state management.
  • Profile System to save and display player information.
  • Sound System to enhance gameplay experience.
  • Settings Page for customizing game preferences.
  • Unique Ghost Movement AI to make the game more challenging.

🧠 What I Have Learned

  • Implementing a Consumer-Listener model for state management.
  • Building a routing system in Java for page navigation.
  • Creating an interactive game environment using Java Swing.
  • Structuring a project for scalability and maintainability.

🖼️ Demo Image

Welcome Page Welcome page of the Game

Main Game Page Main Game page

Game Over Page Game Over page

🛠️ Project Installation

  1. Ensure that Java JDK is installed on your system. If not, download and install it from the official Java website.

  2. Clone the repository:

    git clone https://github.com/pacman.git
  3. Navigate to the project folder:

    cd pacman
  4. Compile and run the project:

    javac .\src\App.java && java App

Author Information

✨ Sahedul Islam Rony

Student/Programmer

I am a Computer Science and Engineering (CSE) undergraduate at Jashore University of Science and Technology having a strong passion for exploring cutting-edge technologies and constantly seek opportunities to learn, innovate, and push the boundaries of what’s possible.

About This Project

The Pacman Game in Java is a fully functional recreation of the classic Pac-Man arcade game, built using Java and Java Swing. This project showcases my ability to implement structured game development concepts, including page routing, state management, and object-oriented programming. The game features smooth player controls, multiple pages, and a modular architecture that ensures scalability and maintainability.

Contact

For any inquiries or feedback regarding this project, feel free to reach out to me:

🙌 Acknowledgements

A huge thanks to Kenny Yip Coding for providing insightful tutorials on game development logic, which greatly helped in understanding the basics of Pac-Man mechanics.


About

A simple PacMan game built in Java Swing that demonstrates Object-Oriented Programming concepts. Perfect for learning fundamental game development principles, state management, collision detection, and event handling with a classic arcade game example.

Topics

Resources

Stars

Watchers

Forks

Languages