A classic Pac-Man arcade game recreation built with React and TypeScript, featuring authentic ghost AI, progressive difficulty, and retro gameplay mechanics.
- 5 Progressive Levels - Increasing difficulty with faster ghosts and shorter power-up durations
- Authentic Ghost AI - Four ghosts (Blinky, Pinky, Inky, Clyde) with unique personalities and behaviors
- Power Pellets - Turn the tables and chase frightened ghosts for bonus points
- Bonus Fruits - Collect level-specific fruits (cherry, strawberry, orange, apple, melon, galaxian)
- Classic Coffee Break Cutscene - Iconic intermission after level 2
- Extra Lives - Earn an extra life every 10,000 points
- High Score Tracking - Persistent high score saved in localStorage
- Scatter/Chase Modes - Ghosts alternate between patrolling corners and hunting Pac-Man
- Cruise Elroy - Blinky speeds up when few dots remain
- Ghost House - Progressive release system with bounce animations
- Frightened Mode - Blue ghosts flee when Pac-Man eats a power pellet
- Eyes Return - Eaten ghosts return to the ghost house for regeneration
- Responsive Design - Adapts to different screen sizes
- Keyboard Controls - Arrow keys for movement
- Sound Effects - Authentic arcade sounds including waka-waka, sirens, and frightened mode music
- Mute Toggle - Control sound on/off
- Accessibility - Screen reader announcements and semantic HTML
- Pixel-Perfect Graphics - Custom SVG animations for Pac-Man and ghosts
- React 18 - UI framework
- TypeScript - Type-safe development
- Vite - Build tool and dev server
- CSS3 - Styling and animations
- SVG - Custom animated graphics
- GitHub Pages - Deployment
- Start the Game - Click "Start Game"
- Move Pac-Man - Use arrow keys (↑ ↓ ← →)
- Collect Dots - Eat all dots to advance to the next level
- Avoid Ghosts - Red, Pink, Cyan, and Orange ghosts will chase you
- Eat Power Pellets - Large dots turn ghosts blue and vulnerable
- Chase Ghosts - Eat blue ghosts for bonus points (200, 400, 800, 1600)
- Collect Fruits - Bonus fruits appear at 70 and 170 dots eaten
- Complete 5 Levels - Beat all levels to win!
- Node.js (v16 or higher)
- npm or yarn
# Clone the repository
git clone https://github.com/alena0490/Pacman.git
# Navigate to project directory
cd Pacman
# Install dependencies
npm install
# Start development server
npm run dev
# Open browser to http://localhost:5173# Create optimized production build
npm run build
# Preview production build locally
npm run preview# Deploy to gh-pages branch
npm run deploy- Dot: 10 points
- Power Pellet: 50 points
- Ghost (1st/2nd/3rd/4th in sequence): 200/400/800/1600 points
- Fruits: 100-5000 points (level-dependent)
- Level 1-2: Cherry & Strawberry (slower ghosts, 8s frightened)
- Level 3-4: Orange (medium speed, 6s frightened)
- Level 5: Apple (fast ghosts, 3s frightened)
- Blinky (Red): Directly chases Pac-Man, speeds up with Cruise Elroy
- Pinky (Pink): Targets position ahead of Pac-Man
- Inky (Cyan): Unpredictable, uses Blinky's position in calculations
- Clyde (Orange): Chases when far, retreats when close
├── public/
│ ├── sounds/ # Audio files
│ ├── img/ # Game images
│ └── fonts/ # Custom fonts
├── src/
│ ├── components/ # React components
│ │ ├── GameField.tsx
│ │ ├── CoffeeBreak.tsx
│ │ ├── StartScreen.tsx
│ │ ├── GameOver.tsx
│ │ └── WinScreen.tsx
│ ├── svg/ # SVG components
│ │ ├── AnimatedPacman.tsx
│ │ └── AnimatedGhosts.tsx
│ ├── hooks/ # Custom hooks
│ │ ├── useSound.ts
│ │ └── useGhostBehavior.tsx
│ ├── utils/ # Utility functions
│ │ └── ghostAI.ts
│ ├── data/ # Game data & constants
│ │ ├── mazeData.ts
│ │ ├── gameConstants.ts
│ │ └── FruitTypes.ts
│ ├── App.tsx # Main game logic
│ └── index.css # Global styles
└── vite.config.ts # Vite configuration
- Original Pac-Man arcade sounds from Voicy Network
- Crackman - Retro arcade font
- Emulogic - Classic game font
- Original Pac-Man (1980) by Namco
This project is open source and available for educational purposes. Pac-Man is a registered trademark of Bandai Namco Entertainment Inc.
Alena Pumprová
- GitHub: @alena0490
- LinkedIn: Alena Pumprová
- Add touch controls for mobile devices
- Implement waiting period for ghost regeneration
- Add more levels beyond level 5
- Create additional coffee break cutscenes
- Add difficulty settings
*Enjoy the game! 👾
