Pacman - Classic Arcade Game

Seele01-Flash
By
Pacman is the legendary arcade maze game that defined a generation. Guide Pacman through intricate mazes, collect dots, eat power pellets, and avoid colorful ghosts in this timeless gaming masterpiece.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "**3D Neon Arcade Pac-Man**". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** Create a modern "Retro-Neon" aesthetic. Instead of flat 2D sprites, use simple 3D geometry. * **Maze:** Construct the maze walls using extruded geometries with a glowing neon material (Neon Blue or Neon Pink to match the screenshot vibe). The floor should be a deep, void-like black (`#000000`) to maximize contrast. * **Pac-Man:** A yellow sphere (`#FFFF00`) with a dynamic "mouth" cutout that opens and closes rhythmically using a simple vertex animation or scaling trick. * **Ghosts:** Use dome-shaped geometries (cylinder with a rounded top) with a "skirt" bottom. Colors: Red (Blinky), Pink (Pinky), Cyan (Inky), Orange (Clyde). Their eyes should be separate white spheres that look in the direction of movement. * **Collectibles:** * **Pellets:** Small, white, unlit cubes or spheres scattered throughout the maze paths. * **Power Pellets:** Larger, pulsating spheres located in the corners. * **Camera:** Use a **PerspectiveCamera** positioned directly overhead (Top-Down view), but slightly tilted (e.g., 75-degree angle) to give a sense of depth to the 3D walls. Ensure the entire maze fits within the width of a mobile portrait screen, or implement a smooth "follow-cam" if the maze is large. * **Performance:** Use `InstancedMesh` for the hundreds of pellets to ensure 60FPS on mobile browsers. Use simple Phong or Lambert materials rather than expensive PBR materials. ### 2. Audio Requirements * **BGM:** A fast-paced, looped 8-bit electronic track. It should feel tense but playful, reminiscent of chiptune arcade music. * **Sound Effects (SFX):** * **Waka-Waka:** A rhythmic, short chopping sound that plays only when Pac-Man is moving *and* eating dots. * **Power Up:** A high-pitched, oscillating siren sound that plays when a Power Pellet is eaten (signaling ghosts are vulnerable). * **Ghost Death:** A rapid descending slide whistle sound when eating a ghost. * **Game Over:** The classic "wilting" sound effect (pitch bending down to silence). ### 3. Gameplay Loop * **Core Logic:** The player navigates the maze to clear all dots. * **Ghost AI:** * Ghosts should navigate the grid. * **Normal Mode:** Ghosts chase the player (can be simple pathfinding toward the player's coordinates). * **Scared Mode:** When a Power Pellet is eaten, ghosts turn Dark Blue, move 50% slower, and move *away* from the player. If caught, they respawn at the center "Ghost House". * **Winning:** Level is complete when all small pellets are consumed. * **Losing:** Touching a non-scared ghost destroys Pac-Man, reducing life count. Game over when lives reach 0. ### 4. Mobile Controls & Interaction * **Screen Orientation:** **Portrait Mode** is preferred for one-handed play. * **Controls - Swipe Gestures:** Implement a robust Swipe detection system. * Swipe Up/Down/Left/Right anywhere on the screen buffers the next move. * **Input Buffering is critical:** If the player swipes "Right" while currently blocked, Pac-Man should turn right at the *very next available intersection*. This prevents the "stuck against a wall" feeling common in bad ports. * **UI:** * **Score:** Large, retro pixel-font text at the top center. * **Start/Restart Button:** A large, pulsating "TAP TO START" overlay that covers the bottom 30% of the screen (easy thumb reach). * **Haptic Feedback:** Trigger a very short vibration (10ms) via `navigator.vibrate` whenever Pac-Man successfully makes a turn or eats a ghost, enhancing the tactile feel. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Pacman stands as one of the most influential and beloved arcade games in gaming history. This iconic maze-chase game has captivated players for decades with its simple yet addictive gameplay mechanics. Navigate through intricate mazes as the famous yellow character, collecting dots while avoiding the relentless pursuit of four colorful ghosts.

The game's enduring popularity stems from its perfect balance of strategy, timing, and quick reflexes. Every maze presents a new challenge, requiring players to plan their routes carefully while staying alert to ghost movements and power pellet opportunities.

Core Features

Classic Arcade Experience

  • Authentic Gameplay : Faithful recreation of the original arcade mechanics and feel
  • Iconic Characters : Control the legendary Pacman and encounter the famous ghosts - Blinky, Pinky, Inky, and Sue
  • Progressive Difficulty : Each level increases in speed and complexity, keeping the challenge fresh
  • Score System : Classic point-based scoring with bonus opportunities for skilled play

Strategic Maze Navigation

The game combines simple controls with deep strategic gameplay. Each ghost has unique AI patterns and behaviors, creating dynamic challenges that require both quick thinking and careful planning.

Power Pellet Mechanics

Collect special power pellets to temporarily turn the tables on your ghostly pursuers. During these brief moments, you become the hunter, chasing down vulnerable ghosts for massive point bonuses.

Timeless Visual Design

The game features the classic retro pixel art style that has become synonymous with arcade gaming. The distinctive maze layouts, vibrant colors, and smooth animations create an instantly recognizable gaming experience.

Game Mechanics

Objective and Scoring

Your primary goal is to collect all dots in each maze while avoiding the four ghosts. Small dots award 10 points each, while larger power pellets provide 50 points plus the ability to eat ghosts temporarily. Bonus fruits occasionally appear for extra points.

Ghost Behavior Patterns

Each ghost follows distinct movement patterns: - Red Ghost (Blinky) : Directly chases Pacman - Pink Ghost (Pinky) : Attempts to ambush from the front - Blue Ghost (Inky) : Uses unpredictable movement patterns - Orange Ghost (Sue) : Alternates between chasing and retreating

Controls and Gameplay

Simple Yet Precise Controls

  • Arrow Keys or WASD : Move Pacman up, down, left, or right through the maze
  • Mouse Click : Alternative control method on touch devices
  • Pause : Space bar or P key to pause the game

The responsive controls ensure smooth navigation through tight maze corridors, allowing for precise movements and quick direction changes when avoiding ghosts.

Strategic Tips

  • Study ghost movement patterns to predict safe routes
  • Save power pellets for strategic moments when surrounded
  • Use maze tunnels to quickly traverse to the opposite side
  • Plan efficient routes to collect all dots with minimal risk

Why Play This Game

Timeless Appeal

Pacman transcends generations with its universal appeal. The game's simple concept masks surprising depth, making it accessible to newcomers while providing endless replay value for experienced players.

Perfect for All Skill Levels

Whether you're a casual gamer looking for quick entertainment or a dedicated player pursuing high scores, Pacman offers the perfect challenge level. The gradually increasing difficulty ensures steady progression without overwhelming frustration.

Brain Training Benefits

The game enhances spatial awareness, quick decision-making, and strategic planning skills. Regular play can improve reaction times and pattern recognition abilities.

Nostalgic Gaming Experience

For many players, Pacman represents the golden age of arcade gaming. Playing this classic brings back fond memories while introducing younger players to gaming history.

Instant Accessibility

No downloads, installations, or complex setups required. Simply open your browser and start playing immediately on any device with internet access.

Frequently Asked Questions (FAQ)