
-----------------------------------
gamequack
Mon Jul 04, 2011 9:17 pm

Pac-man game
-----------------------------------
Hey.  My friend said I should submit my culminating project onto this site, so I am.  If you guys have any comments/criticism/punishing blows that will make me wake up crying in the night, please let it fly.  I want to know how I did and what you think.  Please note that there are no bonuses.  If you find any other differences from the original, let me know.  I know of a few, and I want to see if you guys can catch them.  If you really want, I might post the source code later.

-----------------------------------
apython1992
Mon Jul 04, 2011 9:37 pm

RE:Pac-man game
-----------------------------------
Where's the game? (Don't worry, I've done it too many times)

-----------------------------------
gamequack
Mon Jul 04, 2011 9:41 pm

Re: Pac-man game
-----------------------------------
sorry, my bad.  Here are some screenshots too!

http://i.imgur.com/5ACKI.png http://i.imgur.com/tpuYk.png http://i.imgur.com/gezMJ.png[/img]

-----------------------------------
2goto1
Wed Jul 06, 2011 7:56 am

RE:Pac-man game
-----------------------------------
Great job!

-----------------------------------
gamequack
Thu Jul 07, 2011 9:55 am

Re: Pac-man game
-----------------------------------
Thanks!  Took me a LOT of time!  Did anyone find any differences I missed?

-----------------------------------
2goto1
Thu Jul 07, 2011 11:04 am

RE:Pac-man game
-----------------------------------
I noticed the "level complete" flashing maze animation is missing, the death animation of pac-man and accompanying death music, and a slight jump in the alignment of pac-man when he makes a 90 degree turn into another lane, I guess that may have been due to you needing to orient him properly in the centre of the lane that he turns into, but it's a noticeable little jump. Also the continual background siren music would be nice to see, as well as the bonus fruits, the current fruit level shown at the bottom right. But all in all you did an excellent job recreating this in turing, for almost everything that you did there was a fine attention to the subtleties. Bravo!

-----------------------------------
gamequack
Fri Jul 08, 2011 1:16 pm

Re: Pac-man game
-----------------------------------
I skipped a lot of the animations so I could get it done on time.  I tried to add in the "waka" sounds, but when I did that, the program lagged quite a bit.  Do you have any idea how I could fix that?

-----------------------------------
MPVoiD
Sun Jan 18, 2015 3:18 pm

Re: Pac-man game
-----------------------------------
How'd you make it so that the Ghosts would not collide with the walls? I'm making a Pacman game through turing for fun, and decided that I wanted to make the map different. (I'm basing the code off of yours cause it's so awesome) But the boardvalues seem to only affect Pacman, and not the Ghosts. Just wondering.

-----------------------------------
Insectoid
Sun Jan 18, 2015 11:50 pm

RE:Pac-man game
-----------------------------------
OP hasn't been here since 2011, so I doubt he's going to answer you. Fortunately for you, I'm nearly as useful!

This is actually a someone difficult problem. Probably the most difficult problem in the entire game. I tried making pacman in high school and couldn't get the AI to work either. That was a while ago though and I'm a little better than I was back then.

What you're looking for is pathfinding. This is the process where the AI decides where to go and how to get there. Deciding where to go is the easy part for a simple implementation- you want to go to wherever pacman is. The hard part is figuring out how to get there. 

The ghosts need to be able to 'see' the map. They can't avoid the walls if they don't know where they are. You can do this by representing the screen as a 2-D array of characters, where one character represents a wall and another represents a path. It could look something like this:

[code]
#########
#AAA##AAA# 
#A#AAAA#A#
#A#####A#
#AAAAAAAA#
########[/code]

You get the idea. Just make something like this that looks the same as the game board and it will be relatively easy (still hard) to implement your pathfinding algorithm.

Alternatively, you could create a graph of connected vertices that represent a path. Every intersection is a vertex and the paths are connections between them. This is a little bit less intuitive but cooler to show off.

Anyway, this is just the beginning. You can look up the A* (A-star) algorithm on Wikipedia. It's not hard to understand and there are GIFs that visually demonstrate how it works. Read through that and once you understand it you should be able to at least start implementing it. If you have any trouble at that point, post back here & we'll point you in the right direction.

-----------------------------------
MatthewDaigneau
Mon Jan 19, 2015 12:57 pm

RE:Pac-man game
-----------------------------------
I wish that my school would let me download Winzip.

-----------------------------------
Insectoid
Mon Jan 19, 2015 1:45 pm

RE:Pac-man game
-----------------------------------
Why? I doubt they would notice if you did. I'm 99% sure Windows can open zip files by default anyway.

-----------------------------------
MatthewDaigneau
Mon Jan 19, 2015 1:49 pm

RE:Pac-man game
-----------------------------------
It is because they run a program that blocks pretty much everything. I had trouble getting Chrome. And the fact that the teacher is right behind me also means that I should be careful.

-----------------------------------
gohabsgo007
Mon Jan 19, 2015 5:43 pm

RE:Pac-man game
-----------------------------------
ooh aah eee
jus downloaded it 
its nice!

-----------------------------------
aker
Sun Nov 19, 2017 5:42 pm

RE:Pac-man game
-----------------------------------
I was just wondering how did you make the bordvalue/dotvalue did you just write down all 0's and 1'
