Pacman - Classic Arcade Game

Seele01-Flash
By
Pacman is the legendary arcade maze game that defined gaming culture. Guide Pacman through mazes, collect dots, avoid colorful ghosts, and chase high scores in this timeless classic.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Neon Arcade Maze (Pacman Style)". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** Modern Retro/Neon aesthetic. Use a dark background (`#000000`) with high-contrast, emissive colors for game elements. * **The Maze:** Construct the maze using `BoxGeometry` for walls. Walls should have a glowing neon blue or pink edge (using `LineSegments` or emissive materials). The floor should be a subtle, dark grid or completely invisible. * **Player Character:** A bright yellow `SphereGeometry` with a mouth opening (using `thetaLength`) that animates/chomps as it moves. * **Ghosts:** `CapsuleGeometry` or a cylinder with a rounded top. Use distinct colors (Red, Pink, Cyan, Orange). Add simple geometric eyes (white spheres) that look in the direction of movement. * **Collectibles:** * **Pellets:** Small, static white cubes or tetrahedrons floating slightly above the ground. * **Power Pellets:** Larger, pulsating spheres at the corners of the maze. * **Camera:** Use an **OrthographicCamera** positioned directly overhead (top-down view) to ensure gameplay precision. The camera zoom must dynamically adjust to fit the entire maze width within the mobile screen boundaries. * **Performance:** Use `InstancedMesh` for the hundreds of pellets to ensure 60FPS on mobile devices. ### 2. Audio Requirements * **BGM:** A fast-paced, looping 8-bit chiptune track that increases in tempo slightly when Power Pellets are active. * **SFX:** * **Movement:** A rhythmic "waka-waka" looping sound that only plays when the player is physically moving. * **Eat Pellet:** A subtle, high-pitched "blip" (low volume). * **Eat Power Pellet:** A distinct "power-up" sound followed by a looping siren/alarm sound indicating ghost vulnerability. * **Eat Ghost:** A satisfying retro arcade "crunch" sound. * **Death:** A descending slide whistle or dissolving digital noise. ### 3. Gameplay Loop * **Core Mechanic:** The player navigates a grid-based maze. Movement is continuous; the player continues in the current direction until they hit a wall or change direction. * **Ghost AI:** * **Chase Mode:** Ghosts calculate the shortest path to the player (A* or simple vector tracking). * **Scatter Mode:** Ghosts randomly wander or return to specific corners. * **Frightened Mode:** When a Power Pellet is eaten, ghosts turn dark blue, move slower, and move away from the player for 10 seconds. * **Scoring:** +10 points per pellet, +50 per Power Pellet, +200 per ghost eaten (doubling for each consecutive ghost). * **Win/Loss:** * **Win:** All pellets are cleared. The level resets with slightly higher ghost speed. * **Loss:** Collision with a non-frightened ghost removes a life. Game Over after 3 lives. ### 4. Mobile Controls & Interaction * **Control Scheme:** **Swipe Gestures** anywhere on the screen. * **Input Buffering:** This is critical for mobile playability. If the player swipes "Right" while currently moving "Up" (before the intersection), the system must *queue* the Right turn and execute it automatically at the next valid intersection. Do not require pixel-perfect timing. * **Screen Orientation:** Support **Portrait Mode** by default (ideal for one-handed play). The maze layout should be slightly taller than it is wide to fit mobile aspect ratios, or scale down to fit the width. * **UI Layout:** * **Score & High Score:** displayed at the very top (safe area). * **Lives:** displayed at the bottom left. * **Start/Restart Button:** A large, pulsating HTML overlay centered on the screen (CSS `z-index: 10`) with a minimum touch target of 60x60px. * **Feedback:** Trigger `window.navigator.vibrate(50)` on death and `vibrate(20)` when eating a ghost for tactile feedback. 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 recognizable and beloved arcade games in gaming history. This iconic maze-chase game has captivated players since the arcade era and continues to deliver the same addictive gameplay that made it a cultural phenomenon. Navigate through intricate mazes, collect dots, and outsmart colorful ghosts in this perfectly preserved classic experience.

The game's simple yet engaging concept has made it accessible to players of all ages, while its strategic depth keeps even experienced gamers coming back for more. Each level presents new challenges and patterns to master, ensuring endless hours of entertainment.

Core Features

Timeless Arcade Gameplay

Experience the authentic Pacman mechanics that revolutionized the gaming industry. The game maintains its original charm while being perfectly optimized for modern browsers, delivering smooth performance across all devices.

Strategic Ghost AI

Four uniquely colored ghosts - each with distinct movement patterns and behaviors - create dynamic gameplay scenarios. Learn their patterns, predict their movements, and use strategy to survive increasingly challenging levels.

Power Pellet System

Consume special power pellets to temporarily turn the tables on your ghostly pursuers. During these brief moments of invincibility, chase down ghosts for bonus points and clear your path through the maze.

Progressive Difficulty

As you advance through levels, the game becomes increasingly challenging with faster ghost movements and reduced power pellet duration. Master timing and route planning to achieve high scores.

Free Browser Gaming

Enjoy completely free gameplay without downloads, installations, or registration requirements. Simply open your browser and start playing immediately on any device.

Game Mechanics

The objective is elegantly simple: guide Pacman through maze corridors to consume all dots while avoiding the four roaming ghosts. Complete a level by eating every dot, then advance to the next stage with increased difficulty.

Scoring System: - Small dots: 10 points each - Large power pellets: 50 points each - Ghosts (when vulnerable): 200-1600 points - Bonus fruits: 100-5000 points

Operation Guide

Desktop Controls: - Arrow Keys : Move Pacman up, down, left, or right - WASD Keys : Alternative movement controls - Spacebar : Pause/unpause game

Mobile Controls: - Touch Screen : Swipe in desired direction to move Pacman - Tap : Pause/resume gameplay

Strategy Tips: - Plan your routes to efficiently collect dots while maintaining escape paths - Use corners and tunnels strategically to evade ghosts - Save power pellets for critical moments when surrounded - Learn individual ghost movement patterns for predictive gameplay

Why Play This Game

Perfect for Everyone : Pacman's intuitive controls and clear objectives make it accessible to players of all skill levels, from children to adults.

Quick Gaming Sessions : Ideal for short breaks or extended gaming marathons, with each game session lasting just a few minutes.

Nostalgic Appeal : Relive the golden age of arcade gaming with authentic sounds, graphics, and gameplay mechanics that defined a generation.

Skill Development : Improve hand-eye coordination, strategic thinking, and pattern recognition through engaging gameplay.

Zero Commitment : No downloads, accounts, or payments required - just pure, instant gaming entertainment.

Cross-Platform Compatibility : Play seamlessly on desktop computers, laptops, tablets, and smartphones with responsive touch controls.

Whether you're a longtime fan revisiting a beloved classic or a new player discovering this gaming legend, Pacman delivers timeless entertainment that never goes out of style.

Frequently Asked Questions (FAQ)