A classic Pacman game implementation written in x86 Assembly language using the Irvine32 library.
- Features
- Prerequisites
- Installation
- How to Play
- Game Controls
- Game Features
- File Structure
- Technical Details
- Screenshots
- Contributing
- 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
- MASM32 or compatible x86 assembler
- Irvine32 Library
- Windows Operating System (for Win32 API calls)
- Visual Studio or compatible IDE (recommended)
- Clone the repository:
git clone https://github.com/txbish/pacman-assembly.git
cd pacman-assembly-
Ensure you have the required files:
Pacman.asm- Main game source codepacman_beginning.wav- Background musicpacman_eatfruit.wav- Sound effect for eatingRecord.txt- High scores storage
-
Assemble and link:
ml /c /Fl Pacman.asm
link /SUBSYSTEM:CONSOLE Pacman.obj- Run the executable:
Pacman.exe- Start the Game: Run the executable and enter your name
- Navigate Menus: Use the menu system to start playing, view instructions, or check the leaderboard
- Collect Pellets: Move Pacman around the maze to collect all pellets (dots)
- Avoid Ghosts: Red 'X' characters are enemies - avoid collision
- Use Teleports: Special '@' symbols allow teleportation between maze sections
- Eat Fruits: Collect 'F' symbols for bonus points
- Complete Levels: Clear all pellets to advance to the next level
| 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) |
- Pellets: 1 point each
- Fruits: 5 points each
- Level Completion: Bonus based on level
- Level 1: 1,222 pellets to collect
- Level 2: 1,069 pellets to collect
- Level 3: 1,212 pellets to collect
- Start with 3 lives
- Lose a life when caught by a ghost
- Game over when all lives are lost
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
- Language: x86 Assembly (MASM32)
- Libraries: Irvine32, Win32 API, WinMM
- Platform: Windows x86
main- Main game loopReadInputs- Handle player inputMoveEnemies- AI for ghost movementPMazeCollision- Player collision detectionHighscores- Score management systemTeleportation- Handle teleport mechanics
- Dynamic maze loading based on current level
- Efficient collision detection using coordinate mapping
- Persistent high score storage in Record.txt
Add screenshots of your game here when available
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is open source and available under the MIT License.
- Irvine32 Library for Assembly programming utilities
- Classic Pacman game design inspiration
- MASM32 development environment
Enjoy playing Pacman in Assembly! 🎮👾