Pacman-2D
Game Details
Pacman is the classic arcade maze game where you control Pacman through a maze, eating dots and power pellets while avoiding ghosts. Collect all dots to complete each level and advance to progressively more challenging stages. Eat energizers to turn ghosts vulnerable, allowing you to eat them for bonus points. Features multiple levels with increasing difficulty, fruit bonuses, ghost AI with scatter/chase patterns, high score system, and authentic gameplay mechanics. Navigate mazes and maximize your score through strategic power pellet usage.
Genre: Maze
Category: Arcade
Platform: Browser
HOW TO PLAY
CONTROLS:
- Desktop:
- Arrow Keys / WASD Keys: Move Pacman
- Left Arrow (←) / A Key: Move left
- Up Arrow (↑) / W Key: Move up
- Right Arrow (→) / D Key: Move right
- Down Arrow (↓) / S Key: Move down
- Space Key / P Key: Pause/Resume game
- M Key: Toggle sound on/off
- Enter / Space / Down Arrow: Start game (from main menu)
- H Key: View high scores (from main menu)
- C Key: View controls/help (from main menu)
- Underlined letters in menus: Keyboard shortcuts for navigation
- Menu Navigation:
- Click menu items or use underlined letter keys
- Enter/Return: Confirm actions (save score, start game)
- B Key: Back to main screen (from help, high scores)
- R Key: Restore high scores (from high scores screen)
BASIC MECHANICS:
1. Movement System:
- Grid-based movement through maze corridors
- Direction changes occur at tile centers
- Turn queueing: Press direction before reaching intersection to queue turn
- Cornering: Fast corner turns when turn queued early
- Smooth tile-based movement with speed multipliers
- Wall collision detection prevents movement through walls
2. Pacman (Blob) Behavior:
- Pacman speed varies based on state:
- Normal speed: Level-dependent (0.8 to 1.0)
- Eating speed: Slower while eating dots (0.71 to 0.87)
- Fright speed: Faster during fright mode (0.9 to 1.0)
- Eating fright speed: Fastest during fright while eating (0.79 to 0.87)
- Animated mouth opening/closing (20 frame cycle)
- Direction-based rotation and rendering
- Death animation sequence
3. Dot Collection:
- Collect small dots scattered throughout maze
- Each dot worth 10 points (pillValue = 1, pillMult = 10)
- Dots visible on maze floor
- Collect all dots to complete level
- Dot counter tracks remaining dots
4. Power Pellets (Energizers):
- Large blinking pellets in corners (4 per maze typically)
- Each energizer worth 50 points (energizerValue = 5, pillMult = 10)
- Energizers blink/pulse animation
- Eating energizer activates fright mode
- Fright duration: Level-dependent (6 seconds down to 0 seconds)
5. Fright Mode:
- Activated by eating energizer
- All ghosts turn blue/vulnerable
- Ghosts move slower during fright
- Ghosts change direction and flee
- Ghosts blink white before returning to normal
- Fright time and blink count vary by level
- Player moves faster during fright mode
6. Ghost System:
- Four ghosts: Blinky (red), Pinky (pink), Inky (cyan), Clyde (orange)
- Each ghost has unique AI behavior and targeting
- Ghosts start in pen and exit based on dot count
- Pen leaving limits: [0, 7, 17, 32] dots for each ghost
- Ghosts exit pen in sequence
7. Ghost Modes:
- Scatter Mode: Ghosts retreat to corners
- Chase Mode: Ghosts pursue player
- Fright Mode: Ghosts flee from player (blue)
- Eyes Mode: Ghosts return to pen after being eaten
- Mode switching based on timer and conditions
- Switch times vary by level
8. Ghost AI Behavior:
- Blinky (Red): Aggressive chaser, uses Elroy mode
- Pinky (Pink): Ambushes ahead of player
- Inky (Cyan): Unpredictable targeting
- Clyde (Orange): Patrols when far, chases when close
- Pathfinding uses A* algorithm
- Ghosts target different positions based on mode
9. Elroy Mode (Blinky):
- Blinky enters "Cruise Elroy" mode when dots remaining reach thresholds
- Elroy Mode 1: Activates at level-dependent dot count (20 to 100 dots)
- Elroy Mode 2: Activates at lower dot count (10 to 50 dots)
- Elroy speeds: Level-dependent (0.8 to 1.0, then up to 1.05)
- Makes Blinky more aggressive and faster
10. Ghost Collision:
- Touching normal ghost causes death (lose one life)
- Touching frightened ghost allows eating ghost
- Ghost score increases with combo: 200, 400, 800, 1600 points
- Score formula: 2^amount * 100 (first = 200, second = 400, etc.)
- Eating all 4 ghosts in one fright grants eyes bonus (12,000 points)
- Ghosts respawn after being eaten
11. Eating Ghosts:
- First ghost: 200 points
- Second ghost: 400 points
- Third ghost: 800 points
- Fourth ghost: 1,600 points
- Eyes bonus: 12,000 points for eating all 4 during one fright
- Combo resets after fright ends or eating all 4
12. Fruit System:
- Fruits spawn periodically during level
- First fruit spawns at 174 dots remaining (fruitDots1)
- Second fruit spawns at 74 dots remaining (fruitDots2)
- Fruit types vary by level (Cherries, Strawberry, Peach, Apple, Grapes, Galaxian, Bell, Key)
- Fruit scores increase by level: 100, 300, 500, 700, 1000, 2000, 3000, 5000 points
- Fruits disappear after timeout
- Eating fruit grants bonus score and animation
13. Lives System:
- Start with 2 lives (3 total, including current)
- Lose one life when touching normal ghost
- Extra life awarded at 10,000 points (extraLife constant)
- Maximum 4 lives total
- Lives displayed as blob icons
- Game over when all lives lost
14. Scoring System:
- Dots: 10 points each
- Energizers: 50 points each
- Fruits: 100 to 5000 points (level-dependent)
- Ghosts: 200, 400, 800, 1600 points (combo-based)
- Eyes Bonus: 12,000 points (eating all 4 ghosts in one fright)
- Extra Life: Awarded at 10,000 points
- Score multiplier: Level-dependent for pills
15. Level Progression:
- Multiple levels with increasing difficulty (at least 18+ levels)
- Speed increases per level (ghost speed, pacman speed)
- Fright time decreases in later levels (6s to 0s)
- Fruit scores increase in later levels
- Ghost AI becomes more aggressive
- Complete level by collecting all dots
16. Speed Variations:
- Normal ghost speed: 0.75 to 0.95
- Tunnel speed: 0.4 to 0.5 (ghosts in tunnels)
- Pen speed: 0.6 (ghosts in pen)
- Exit pen speed: 0.4
- Eyes speed: 2.0 (ghosts returning to pen)
- Fright speed: 0.5 to 0.6 (ghosts in fright mode)
17. Pen Mechanics:
- Ghosts start in center pen
- Ghosts exit based on dot count thresholds
- Ghosts return to pen when eaten (eyes mode)
- Pen forces ghost movement after leaving
- Pen leaving limits prevent all ghosts exiting simultaneously
18. Tunnel System:
- Left and right tunnels connect maze sides
- Ghosts slow down in tunnels
- Pacman can traverse tunnels normally
- Tunnels provide escape routes
19. Screen States:
- Main Screen: Menu with Start, High Scores, Controls
- Ready Screen: "Ready" animation before level starts
- Playing Screen: Active gameplay
- Paused Screen: Game paused, shows "Paused" text
- Game Over Screen: Enter name for high score
- High Scores Screen: Leaderboard display
- Help/Controls Screen: Instructions and controls
20. High Score System:
- High scores saved with player name
- Scores tracked per level achieved
- High scores displayed in leaderboard
- Restore function available
- LocalStorage persistence
21. Animation System:
- Ready animation before level start
- Death animation when Pacman dies
- Ghost score animations when eating ghosts
- Fruit score animations when eating fruits
- End level animation when level complete
- New level animation between levels
- Game over animation
- Paused animation/text
22. Sound System:
- Sound effects for eating dots (alternating eat1/eat2)
- Ghost eating sound ("kill")
- Death sound ("death")
- Start game sound ("start")
- Sound toggle with M key
- Sound on/off state persists
23. Visual Effects:
- Canvas-based rendering
- Smooth animations
- Blinking energizers
- Fruit animations
- Score popup animations
- Death sequence animations
24. Turn Queueing:
- Queue turns before reaching intersection
- Turn executes when reaching tile center
- Cornering allows fast corner turns
- Prevents accidental wall crashes
25. Game Flow:
- Start at main menu
- Select "Start Game" to begin
- Ready animation plays
- Level begins with all dots visible
- Collect dots and avoid/eat ghosts
- Complete level by collecting all dots
- Advance to next level automatically
- Game over when lives exhausted
- Enter name for high score
STRATEGIC TIPS:
- Power Pellet Strategy: Save energizers for when multiple ghosts are nearby. Eating all 4 ghosts during one fright mode grants massive 12,000 point eyes bonus.
- Ghost Combo Planning: Eat ghosts in sequence (200, 400, 800, 1600) during single fright period. Maximize points through combo timing.
- Fruit Timing: Fruits spawn at 174 and 74 dots remaining. Plan route to collect fruits while maintaining ghost avoidance.
- Elroy Awareness: Watch for Blinky's Elroy mode activation. When dots get low, Blinky becomes faster and more aggressive.
- Turn Queueing: Queue direction changes before intersections. Pre-queued turns enable faster navigation and cornering.
- Scatter/Chase Timing: Learn ghost mode switching patterns. Use scatter mode to collect difficult dots safely.
- Tunnel Utilization: Use side tunnels to escape ghosts. Tunnels slow down ghosts, giving you advantage.
- Pen Strategy: Know ghost exit timings from pen. Early levels have staggered exits preventing all ghosts from leaving simultaneously.
- Cornering Mastery: Master fast corner turns for efficient maze navigation. Cornering saves time and avoids ghost encounters.
- Life Conservation: Protect your limited lives. Extra life at 10,000 points provides crucial buffer for later levels.
ADVANCED TECHNIQUES:
- Ghost Farming: Use energizers strategically to chain ghost eating. Position yourself to intercept multiple fleeing ghosts for maximum combo.
- Pattern Recognition: Learn ghost AI patterns for each ghost type. Understanding targeting enables prediction and evasion.
- Route Optimization: Develop efficient dot collection routes. Minimize backtracking and maximize safety.
- Speed Adaptation: Master movement at all speed variations. Different speeds affect turning and navigation timing.
- Fright Mode Mastery: Maximize ghost eating during fright periods. Chain all 4 ghosts for eyes bonus.
- Fruit Collection: Always collect fruits when they appear. Fruits provide significant score bonuses, especially in later levels.
- Elroy Management: Handle Blinky's Elroy mode strategically. Elroy mode increases difficulty but offers opportunities.
- Pen Manipulation: Understand ghost pen mechanics. Ghost exit timing affects gameplay strategy.
- Combo Maximization: Plan ghost eating sequences. Eating ghosts in order maximizes point values.
- Level Progression Mastery: Adapt to increasing difficulty. Speed changes and reduced fright time require skill development.
WINNING AND PROGRESSION:
- Level Completion: Complete all levels by collecting every dot. Each level completed advances to more challenging stage.
- Score Achievement: Maximize scores through efficient play. Combine dots, fruits, and ghost combos for high scores.
- High Score Competition: Compete for leaderboard positions. High scores tracked with player names and levels achieved.
- Extra Life Earning: Earn extra life at 10,000 points. Extra lives crucial for surviving higher levels.
- Eyes Bonus Achievement: Eat all 4 ghosts during one fright period. Eyes bonus (12,000 points) significantly boosts score.
- Level Mastery: Master each level's unique challenges. Speed increases and reduced fright time test skills.
- Perfect Play: Complete levels without losing lives. Perfect play demonstrates mastery and maximizes score potential.
- Fruit Collection: Collect all fruits in each level. Fruits provide substantial score bonuses, especially valuable in later levels.
- Combo Excellence: Maximize ghost eating combos. Chaining ghost eating during fright mode optimizes scoring.
- Endurance Challenge: Progress through as many levels as possible. Higher levels become increasingly difficult with faster speeds and shorter fright times.
Enjoy mastering the classic Pacman maze game and competing for high scores!
This is a free browser game available on MysticByte Studios. No downloads required - play instantly in your browser!