Need a Pacman clone for example

Hello guys iam new to programming games in Monogame and iam trying to build a pacman classic clone myself. The problem i have is that there are no tutorials for this and iam stuck on some places and i have no idea what to do there.

My question is, if someone has made a classic pacman clone already and maby i can use their Pacman clone as a example to create mine to understand the code and structures that are used.

Thanks in advance.

1 Like

I don’t know if you will be able to learn much from the code though.
Its a little sloppy, because I did it in a hurry, and was not so skilled at the time… But it all works. Even has sound, and transitions, levels change color and layout…

Has the following classes: Ghost, pacman, fruit, tile, level, and audio-player…

1600 lines of code. But I think a good deal of that is switch statements that just set level colors and such.

Then of coarse, you need the assets, sounds and graphics… I made mine myself to learn some digital art.
-Except I think the font, which I found online.

Honestly though, it took a team of Japanese experts at least a week or more to create the original, so it’s not as simple as one might think. Ghosts need good behaviors, there are power-ups, it saves high-scores, has cut-scenes and so on… Tetris was way simpler. And solitaire was only about 500 lines INCLUDING more features than you really need.

Snake I did in 170 lines, which includes intro and death screens…

If this is your first game, I recommend something WAY simpler… ala snake or pick-up-sticks.

1 Like

@Mando_Palaise yes i made some other games but with winform and stuff. I would really appriciate it if you could share the code with so that i have a example on how everything works it could be a great example for me as iam new with monogame and have to make a pacman game.

I’m going to not share it right at first.

Because honestly, I’m getting a feeling that you are either insincere about your intentions, or don’t understand what you are getting into. For all I know, you are here to sell it on some overseas game-site, which could hurt ME legally, down the line… -After all, you ARE new here.

Now I am saying this to help you get on the right track, not to detract.
You don’t learn monogame from looking at a 1600 line project.

This is your first post here, and your first experience with the mono-game frame-work. I am pretty much telling you the following:

If you don’t know how to do your own pac-man, I don’t think you are ready to do pac-man… Even with my code.

First of all, there is no “right way” to code pacman. You do what you need to do, to get things the way you want. NO 2 programmers would do it the same.

Pacman requires NO programming skills that are unique to pac-man… It’s just a much longer project.

You FIRST need to understand the GENERAL concepts of “classes” and “instances”, tile-maps and sprite movement, loading content, the update method, the draw method, and how to play sound.

-All of these concepts, you CAN find tutorials on… Once you know how to do all the basics, pacman kinda writes itself. I didn’t even research for pacman, or take notes. It just sprang into being from knowing the basics of mono-game and/or c#.

For REAL. Start by doing 100 balls bouncing on the screen/in a window. This will teach you what loading assets is, how to update sprite positions and check for collisions… Then add a bounce sound. That sort of thing.

If you do that, pac-man will be right around the corner. But nobody starts at pac-man :slight_smile:

ah okay iam not trying to sell it i have to make a similiar kind of project for my school and that is why i wanted to use your code so i would know how to implement some stuff

like enemy collis draw gameboard and bouncing stuff

@Mando_Palaise