Skip to content

Txbish/pacman-assembly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎮 Pacman Game - Assembly x86

A classic Pacman game implementation written in x86 Assembly language using the Irvine32 library.

📋 Table of Contents

✨ Features

  • Classic Pacman Gameplay: Navigate through mazes, collect pellets, and avoid ghosts
  • Multiple Levels: 3 unique maze layouts with increasing difficulty
  • Sound Effects: Audio feedback for eating pellets and fruits
  • High Score System: Save and display player scores with persistent storage
  • Teleportation: Special teleport zones in mazes
  • Fruit Bonuses: Random fruit spawning for extra points
  • Lives System: Multiple lives with game over conditions
  • Pause/Resume: Pause game functionality
  • Instructions: Built-in game instructions
  • Leaderboard: Track top scores across game sessions

🔧 Prerequisites

  • MASM32 or compatible x86 assembler
  • Irvine32 Library
  • Windows Operating System (for Win32 API calls)
  • Visual Studio or compatible IDE (recommended)

📦 Installation

  1. Clone the repository:
git clone https://github.com/txbish/pacman-assembly.git
cd pacman-assembly
  1. Ensure you have the required files:

    • Pacman.asm - Main game source code
    • pacman_beginning.wav - Background music
    • pacman_eatfruit.wav - Sound effect for eating
    • Record.txt - High scores storage
  2. Assemble and link:

ml /c /Fl Pacman.asm
link /SUBSYSTEM:CONSOLE Pacman.obj
  1. Run the executable:
Pacman.exe

🎯 How to Play

  1. Start the Game: Run the executable and enter your name
  2. Navigate Menus: Use the menu system to start playing, view instructions, or check the leaderboard
  3. Collect Pellets: Move Pacman around the maze to collect all pellets (dots)
  4. Avoid Ghosts: Red 'X' characters are enemies - avoid collision
  5. Use Teleports: Special '@' symbols allow teleportation between maze sections
  6. Eat Fruits: Collect 'F' symbols for bonus points
  7. Complete Levels: Clear all pellets to advance to the next level

🎮 Game Controls

Key Action
W Move Up
S Move Down
A Move Left
D Move Right
P Pause Game
E Resume Game (from pause)
I View Instructions
L View Leaderboard
X Exit Game
/ Skip Level (cheat)

🎨 Game Features

Scoring System

  • Pellets: 1 point each
  • Fruits: 5 points each
  • Level Completion: Bonus based on level

Level Progression

  • Level 1: 1,222 pellets to collect
  • Level 2: 1,069 pellets to collect
  • Level 3: 1,212 pellets to collect

Lives System

  • Start with 3 lives
  • Lose a life when caught by a ghost
  • Game over when all lives are lost

📁 File Structure

pacman-assembly/
├── Pacman.asm           # Main game source code
├── pacman_beginning.wav # Background music
├── pacman_eatfruit.wav  # Sound effects
├── Record.txt           # High scores storage
└── README.md           # This file

🔧 Technical Details

Architecture

  • Language: x86 Assembly (MASM32)
  • Libraries: Irvine32, Win32 API, WinMM
  • Platform: Windows x86

Key Procedures

  • main - Main game loop
  • ReadInputs - Handle player input
  • MoveEnemies - AI for ghost movement
  • PMazeCollision - Player collision detection
  • Highscores - Score management system
  • Teleportation - Handle teleport mechanics

Memory Management

  • Dynamic maze loading based on current level
  • Efficient collision detection using coordinate mapping
  • Persistent high score storage in Record.txt

🎬 Screenshots

Add screenshots of your game here when available

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 License

This project is open source and available under the MIT License.

🙏 Acknowledgments

  • Irvine32 Library for Assembly programming utilities
  • Classic Pacman game design inspiration
  • MASM32 development environment

Enjoy playing Pacman in Assembly! 🎮👾

About

A classic Pacman game implementation written in x86 Assembly language using the Irvine32 library.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors