profile picture
profile picture for mobile



Pacman Game

Category: Desktop Application (C#)

In 2013, near the end of high school I decided to write another game in C# using GDI+ (I made this game using school computers which did not support available game engines as the time and thus my choice for GDI+). I am posting this project due to it being commented very nicely and it provide a base for those of you looking to make a simple C# game using GDI+.

The game is completely drawn in GDI+ using shapes and lines except for the ghost npcs in which are images that drawn.

This game provides a basic game loop in which floors the following order of events:

while (true)
                //Stop the program from freezing

                //If the player collected all the food / balls then trigger a win event 
                if (playerScore == 1810)
                    //Tell the player he won 
                    MessageBox.Show("YOU WIN!");

                    //Kill thep process (I was lazy and used infinite loops)

                //Limit Frames?
                //if (intTick < 30)
                //    Thread.Sleep(10);

                //Draw the next frame 
                //Update the Frames Per Second

Due the project being an older programming projec, not all of the best programming practices were followed however it's not a horrible project.

Here's a screen shot of the game:


I have also prepared a short GIF of the game in action, please see below:

Game Play:

The coolest part about this game is that actually includes sound effects when pacman eats food or when he is killed by ghost.

If you are interested in the source or trying out the game, please see the github link below!

Pacman Game - Github