8000
Skip to content

HaD0Yun/Unity-Pacman-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unity Pacman Game

This entire project was created by AI in just 30 minutes with only 4 human prompts.
From architecture design to code implementation and bug fixes — all done by AI (Claude).

Unity License AI Generated Prompts


🚨 A Message to All Developers

Stop studying programming. Start leveraging AI.

The era of spending years learning syntax, memorizing APIs, and debugging for hours is over.

This complete game — with 17 scripts, 4 AI behaviors, procedural graphics, and complex game logic — was built in 30 minutes with 4 prompts. No programming knowledge required from the human operator.

The new skill isn't coding. It's communicating with AI.

"The best programmers of the future won't write code. They'll write prompts."


🤯 The 4 Prompts That Built This Game

The human operator only typed 4 prompts to create this complete Pacman game:

# Human Prompt What AI Did
1 "Hi! We're going to build a classic game called Pac-Man. Right now, this project has no sprites and no scripts, so we'll create everything from start to finish—first by writing a game design plan, then implementing the game based on that plan, and finally recreating the same Game Scene as the reference image you provided" Designed architecture, created 17 scripts, built maze system, implemented ghost AI, generated procedural sprites — the entire game
2 "TextMesh Pro downloaded" Acknowledged and continued with UI implementation
3 "Confirmed it's working" Verified game functionality and checked for remaining issues
4 "Check why the red ghost flies off the map at start" Diagnosed Blinky's initial direction bug and fixed it

That's it. One initial prompt to describe the goal, and 3 simple follow-ups.
The AI handled everything autonomously — design, coding, debugging, and testing.


🎮 About

A faithful recreation of the classic Pacman game built with Unity 6 (URP).
All sprites are procedurally generated through code — zero external assets.

✨ Key Features

  • 100% AI-Built: Complete game created in 30 minutes
  • Only 4 Human Prompts: Minimal human intervention required
  • Zero External Assets: All graphics generated by ProceduralSpriteGenerator
  • Classic Maze: Authentic 28x31 tile layout
  • 4 Ghost AI Personalities: Each with unique chase patterns
    • 🔴 Blinky (Shadow): Directly chases Pacman
    • 🩷 Pinky (Speedy): Ambushes 4 tiles ahead of Pacman
    • 🩵 Inky (Bashful): Flanks using Blinky's position
    • 🟠 Clyde (Pokey): Retreats when within 8 tiles
  • New Input System: Modern Unity input handling

🕹️ Controls

Key Action
W A S D / Move
R Restart Game

🏗️ Project Structure

Assets/
├── Scripts/
│   ├── Core/           # GameManager, GameConstants, GameBootstrapper
│   ├── Maze/           # MazeData, MazeGenerator (Tilemap)
│   ├── Player/         # PacmanController
│   ├── Ghosts/         # GhostBase, Blinky, Pinky, Inky, Clyde
│   ├── Collectibles/   # Dot, PowerPellet, DotManager
│   ├── UI/             # UIManager
│   └── Utilities/      # ProceduralSpriteGenerator
├── ScriptableObjects/
│   ├── GameConfig/     # Game configuration data
│   └── MazeData/       # Maze layout data
└── Scenes/
    └── SampleScene.unity

🎯 Implemented Features

Gameplay

  • Grid-based movement with input buffering
  • Tunnel wrap-around (left/right)
  • Dot & Power Pellet collection
  • Scoring system (10pts/dot, 50pts/power pellet)
  • Lives system (starts with 3)
  • Level progression

Ghost AI

  • Scatter mode (corner patrol)
  • Chase mode (pursue Pacman)
  • Frightened mode (power pellet effect)
  • Eaten mode (eyes return to ghost house)
  • Ghost house entry/exit logic

Technical Features

  • Procedural sprite generation
  • Tilemap-based maze rendering
  • Component-based collision detection (no tags)
  • ScriptableObject-based configuration
  • Event-driven architecture

🛠️ Tech Stack

  • Unity 6000.3.0f1
  • Render Pipeline: URP (Universal Render Pipeline)
  • Input System: New Input System
  • UI: TextMesh Pro

🚀 How to Run

  1. Install Unity 6000.3.x via Unity Hub
  2. Open the project
  3. Open Assets/Scenes/SampleScene.unity
  4. Click Play

🤖 AI Development Process

This project was completed by Claude (Anthropic) in 30 minutes:

  1. Architecture Design: Folder structure, class hierarchy
  2. Code Generation: 17 C# scripts created
  3. Maze Data: Classic Pacman layout implementation
  4. Sprite System: Procedural graphics generation
  5. Bug Fixing: Tag errors, input system, initialization order issues
  6. Testing & Debugging: Real-time testing via Unity MCP

Tools Used

  • Claude: Code generation and architecture design
  • Unity MCP: Real-time Unity Editor control and testing

📊 Stats

Metric Value
Development Time ~30 minutes
Human Prompts 4
Lines of Code ~3,000+
C# Scripts 17
External Assets 0

📄 License

MIT License


🙏 Credits

  • Original Pacman: Namco (1980)
  • AI Development: Claude (Anthropic)
  • Unity MCP Integration: AI-Game-Developer

🎮 Complete game built with AI using only 4 human prompts 🤖

About

Classic Pacman game built with Unity 6 (URP) - procedural sprites, 4 ghost AI, New Input System

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

0