So, I decided to recreate PAC-MAN. You know, the little yellow guy eating dots while being chased by ghosts. Simple enough, right? Well, not exactly.
This project is a recreation of the original PAC-MAN arcade game, built using Visual Basic .NET, Windows Forms, and .NET 8. It includes the classic maze, pellets, power pellets, scoring, lives, tunnel warping, and ghosts with different behavioral modes.
How does it work?
The game uses a matrix-based map system to represent the maze. Instead of manually positioning every single wall and path, the map is translated into a grid that the game can understand. Each tile has its own type, allowing the game to identify walls, paths, and even the ghost house.
PAC-MAN and the ghosts move around this grid, with collision detection keeping everything where it should be. The ghosts also have their own logic, switching between different behavioral modes such as chasing, scattering, frightened, and returning to their house. Basically, they aren’t just randomly wandering around hoping to catch you.
The game loop is controlled by a timer, which updates movement and gameplay at regular intervals. There’s also sprite rendering to bring the characters and maze to life.
What was difficult?
Definitely the ghosts. Making them behave somewhat like the original game was a whole different level of trouble. Getting their movement, decisions, collisions, and behavioral modes to work together without breaking everything required quite a bit of debugging.
Another challenge was translating the maze into a 28 × 36 matrix and making the game understand how to navigate it. Movement might sound easy until you have to deal with walls, intersections, tunnels, and characters that shouldn’t be able to walk through absolutely everything.
Collision detection and coordinating the game logic with the rendering were also interesting challenges. Turns out, making a yellow circle eat dots is not as straightforward as it looks.
What do you need to test it?
Nothing too fancy:
A Windows PC.
The compiled game files.
The .NET 8 runtime, if it isn’t already included or installed.
A keyboard to control PAC-MAN.
Download the release, extract the files, and run the executable. No Visual Studio, coding experience, or complicated setup required.
A little technical information:
Language: Visual Basic .NET
Framework: .NET 8.0
Interface: Windows Forms
Platform: Windows
License: MIT
This was primarily a learning project, and most of the game logic was developed by me. I did get some help with parts of the interface and animations, but the core mechanics, ghost behavior, and maze system were my own work.
Enjoy getting chased by four ghosts. Have fun.
- 3 devlogs
- 5h