Demo Original PAC-MAN 1980 Edition

Sabnock

Member
Hi all, long time no post :D

I posted my first Pacman effort late last year to a mixed but mostly positive reception. Personally I wasn't happy with it at all and look back on it with a sense of disappointment.

I then started another project called GRV1(still in progress) but could never get over the fact that I hadn't built the PACMAN that I loved to play when I was young and an arcade addict. so I quit GRV1 and set about researching and experimenting with various ways to achieve the movement, AI and pace that makes PAC the amazing game that it is. I also moved over to GMS2 at this time so it was a good project to learn how to use that as well.

what I present here I am genuinely happy with and feel it represents the original in an accurate and respectful way.

LINK : http://www.mediafire.com/file/pbbxqnqfx3dlp7j/PAC-MAN_25102017_Final.zip
Release notes

- I have corrected the bugs noted in this thread and found since I finished it.
- Maze wall clipping when compiled with the YYC
- eyes facing the wrong way when reversing.
- high score glitches.
- added an arcade style attract mode.
- installed a smoother scrolling text routine for the ticker bottom right
- stream lined and improved a lot of code.
- added xbox 360 controller support
- added volume control in the pause menu
- changed the layout of the debug mode and added more info and the ability to turn on or off ghost info.
- fixed numerous bits that were annoying me :D

unfortunately it is a timed demo (2min) as I am worried about copyrights and stuff and don't want to be seen to be giving away free copies of a game that is not my own IP. 2 minutes starts from when you hit the space bar to play.

hope you enjoy and look forward to any comments, bug reports and even criticisms you may have.

Screenies below :

PM_1.PNG PM_2.PNG PM_3.PNG PM_4.PNG

I have implemented the full original ghost AI. I took some time to work out how the original coders would have had to have done it with little processing power and memory and think I have achieved an almost exact match for the ghost scatter, chase, speed changes and even managed to get Cruise Elroy in there. the speed changes whilst still moving the same pixel count each frame was initially challenging but the result works well. I have also put in th early / late cornering for PAC to give him that slight speed advantage in the turns. if you enable the debug mode from the PAUSE menu you can see a lot of these mechanics at work.

for those who may be interested the game was built around and has all the features described in the PACMAN dossier found here. https://www.gamasutra.com/view/feature/3938/the_pacman_dossier.php?print=1 a fantastic read and a great insight into the genius of the coders back in the 80's.

Sab.
 
Last edited:
M

Matt Hawkins

Guest
Wuka wuka wuka. Not bad at all, it does have some bugs though. While playing i noticed a ghost clipping through a wall, and after eating a power pellet i was eating ghosts that were bunched together and i was able to pass through a ghost without eating him/her. And it does seem a bit easier than the original.
Saying that, as much as pac man might seem like a simple game, it is quite complex and i think coding it would take a lot of skill and finesse...
Over all i think you've done a great job, and the presentation is excellent.
 

Sabnock

Member
Wuka wuka wuka. Not bad at all, it does have some bugs though. While playing i noticed a ghost clipping through a wall, and after eating a power pellet i was eating ghosts that were bunched together and i was able to pass through a ghost without eating him/her. And it does seem a bit easier than the original.
Saying that, as much as pac man might seem like a simple game, it is quite complex and i think coding it would take a lot of skill and finesse...
Over all i think you've done a great job, and the presentation is excellent.
Thanks Matt.

I will review the clipping issues.

The bunching is something that did happen in the original but maybe not as much as here so I will review that as well.

Same for the passing through issue. His was in the original and happens because of the way the grid works but again maybe not as often as in my version so will see what I can do. It is probably a scaling issue.

You are correct in your comment about Pacman being quite a complex game. There is far more going on in the background than I ever imagined when I played it as a kid and thank you for the compliment.
 
G

Guest User

Guest
Superb clone and I know just how hard you worked on it and how complex the game really is under the lid. (way moreso than I ever thought tbh!)
It's just as fun as the original and imo just as damn hard haha, I suck at it too but at least it doesn't rob me of my 10p's ;)

Great work!
 

Sabnock

Member
Superb clone and I know just how hard you worked on it and how complex the game really is under the lid. (way moreso than I ever thought tbh!)
It's just as fun as the original and imo just as damn hard haha, I suck at it too but at least it doesn't rob me of my 10p's ;)

Great work!
Thank AP. You know because I have been boring you with it for ages

This has helped in the development as has my kids buying me the toys
 

Attachments

Mick

Member
Nice work @Sabnock, I never really learned how to play Pac-man in the 80s. This version seems very faithful with a lot of details from the original. Like @AncientPaul said, the game is not so simple under the hood.
 

Sabnock

Member
Nice work @Sabnock, I never really learned how to play Pac-man in the 80s. This version seems very faithful with a lot of details from the original. Like @AncientPaul said, the game is not so simple under the hood.
Hi Mick,


Thanks for the great comments.

I have tried to include every detail I could find out about the original including pinky's and inky's overflow bug that mistakenly includes a left offset equal in distance to the expected up offset when pacman is heading up the screed.

the only thing I feel I haven't got fully correct is the frightened ghost pseudo random movement and will review this at some point. but for now I am going to do something else :D
 
B

Blakkid489

Guest
How did you make Blinky follow your path? I have a pacman game that I would love for that to implemented in my game.
If you wanna see it, here
 

Sabnock

Member
pm_6.PNG View attachment 12765 View attachment 12765
How did you make Blinky follow your path? I have a pacman game that I would love for that to implemented in my game.
If you wanna see it, here
How does your path finding work currently?

If you turn on the debug mode from the pause menu you will see that my version works on a tile based grid system. The link to the PAC man dossier gives a lot of insight to how the original was done. The actual path finding algorithms I have developed are very simple and small which I think is how they would have done it.

if you look at the pictures I have attached you can see this grid along with the ghost targeting
 
Last edited:
B

Blakkid489

Guest
How does your path finding work currently?

If you turn on the debug mode from the pause menu you will see that my version works on a tile based grid system. The link to the PAC man dossier gives a lot of insight to how the original was done. The actual path finding algorithms I have developed are very simple and small which I think is how they would have done it.

if you look at the pictures I have attached you can see this grid along with the ghost targeting
Interesting I've been using the generic code from back in the sandbox gm6 days that basically just has them move around the grid
Code:
// This script adapts the direction of the monster
// when it comes at a possible crossing
{
  if (hspeed == 0)
  {
    if (random(3)<1 && place_free(x-32,y))
      { hspeed = -(global.gspeed); vspeed = 0;}
    if (random(3)<1 && place_free(x+32,y))
      { hspeed = global.gspeed; vspeed = 0;}
  }
  else
  {
    if (random(3)<1 && place_free(x,y-32))
      { hspeed = 0; vspeed = -(global.gspeed);}
    if (random(3)<1 && place_free(x,y+32))
      { hspeed = 0; vspeed =  global.gspeed;}
  }
}
It's amazing how I never learned about tile-based grid systems since then. . . .:confused:
 
It feels like Pac-Man. Probably the best feeling Pac-Man recreation. The only real issue I found is sometimes the ghosts face the opposite direction they're traveling. Controller, full screen and an exit option (for when you're in full screen) would be appreciated.
 
T

teamrocketboyz

Guest
Played it. didnt find a single bug. absolutely spot on mate, I can only imagine what went into this.
 

Sabnock

Member
Interesting I've been using the generic code from back in the sandbox gm6 days that basically just has them move around the grid
Code:
// This script adapts the direction of the monster
// when it comes at a possible crossing
{
  if (hspeed == 0)
  {
    if (random(3)<1 && place_free(x-32,y))
      { hspeed = -(global.gspeed); vspeed = 0;}
    if (random(3)<1 && place_free(x+32,y))
      { hspeed = global.gspeed; vspeed = 0;}
  }
  else
  {
    if (random(3)<1 && place_free(x,y-32))
      { hspeed = 0; vspeed = -(global.gspeed);}
    if (random(3)<1 && place_free(x,y+32))
      { hspeed = 0; vspeed =  global.gspeed;}
  }
}
It's amazing how I never learned about tile-based grid systems since then. . . .:confused:
Yes, there is a tile grid that the game uses for all movement, collisions and AI. I used a ds_grid for this. The AI is pretty simple but it is the variety of the way the ghosts target pm that give the real impression the ghosts are working together.

Let me know how you get on or if you need some advise and I will help if I can.

Sab
 

Sabnock

Member
updated OP with new link.

Also here http://www.mediafire.com/file/pbbxqnqfx3dlp7j/PAC-MAN_25102017_Final.zip

Release notes

- I have corrected the bugs noted in this thread and found since I finished it.

- Maze wall clipping when compiled with the YYC
- eyes facing the wrong way when reversing.
- high score glitches.

- added an arcade style attract mode.
- installed a smoother scrolling text routine for the ticker bottom right
- stream lined and improved a lot of code.
- added xbox 360 controller support
- added volume control in the pause menu
- changed the layout of the debug mode and added more info and the ability to turn on or off ghost info.
- fixed numerous bits that were annoying me :D

this it now. done and dusted. moving on :D

Enjoy
 
Last edited:

Sabnock

Member
It feels like Pac-Man. Probably the best feeling Pac-Man recreation. The only real issue I found is sometimes the ghosts face the opposite direction they're traveling. Controller, full screen and an exit option (for when you're in full screen) would be appreciated.
all issues have been fixed. I think :D
 

William22

Member
Thanks. Now it's better then the original! Please consider releasing sourcecode. I have a small group of children that I educate about programming outside school hours.
This feels like a nice project to continue with. Thanks
 

Sabnock

Member
Thanks. Now it's better then the original! Please consider releasing sourcecode. I have a small group of children that I educate about programming outside school hours.
This feels like a nice project to continue with. Thanks
Thanks William22.

Unfortunately I won't be releasing the code for this as I have plans for it myself.
 
Top