Share your repls and programming experiences

← Back to all posts
js: PAC-MAN
h
SeamusDonahue (458)

PAC-MAN

This is the classic game of pac-man. You should know how this works but just incase:

  • 4 ghosts chase you around the maze
    - blinky : shadow
    - pinky : speedy
    - inky : bashful
    - clyde : pokey
  • you must collect the dots in the maze.
  • you can eat power pellets in order to turn the ghosts blue
  • blue ghosts can be eaten and turn into grey ones (what would be eyes in the original)
  • greys (eyes) cannot hurt you and go to the ghost pen to regenerate.
  • power pellet scores do not reset unless the power pellet fully runs out (max of 6400 per ghost instead of 1600 or the championship series's 3200 limit)
  • power pellets have less active time the farther you get.

use wasd to move, space to pause, l to toggle lives, m to toggle sound (off by default because I know some of you are incognito somewhere playing this)

Meet the ghosts

blinky

He is called shadow because he is always behind you! this ghost will make it so you basically can't ever turn around. he's always around the corner and he is always angry.

pinky

she's called speedy because she is always one step ahead! Anytime you make a turn you can count on pinky being there. When she isn't in front of pacman she isn't ever far behind.

inky

He's called bashful because this ones a little shy. He just needs a little encouragement from blinky to get going. despite the fact that he kills pacman on touch, he's still a little afraid. He always tries to work up the courage but he can't go near pacman without his buddy blinky. He just can't seem to do it.

clyde

He is called pokey because... well... okay lets just say it, he is stupid. He does his best but he rarely ever attacks pacman directly. usually going up and running away. He doesn't seem to understand that the objective is to kill pacman...

conclusion

Make sure to post your highest scores in the comments. Have a nice day, and more importantly have fun!

Comments
hotnewtop
SudhanshuMishra (250)

this is very cool/awesome/pog/interesting/exciting...

DynamicSquid (5024)

This is awesome! I really like how you programmed the actual ghosts' AI into this!

SeamusDonahue (458)

I'm super glad you liked it! And also yea... I couldn't leave their personalities out of it... it just wouldn't be the same. @DynamicSquid

firefish (953)

@SeamusDonahue pixel art like this

don't judge i'm awful
also i made that picture massive don't use it

SeamusDonahue (458)

interesting, I might fork the project and make a version with sprites, just as soon as i figure out how to do that with b5js @firefish