Pac-inspired game - feedback request

I have written a PacMan inspired game that runs as a Java applet. I’d like to get feedback from people. The most recent version is located here:

http://www.angelfire.com/games4/anirak/tutorial/day9/

http://www.angelfire.com/games4/anirak/tutorial/day10/

Source is linked to on the page, but the source is a bit of a mess right now. I need to go through and refactor much of it.

Sorry about the free-hosting pop-ups and such.

My goal was not to make an authentic PacMan clone, but to write a new game that used ideas from PacMan but incorporates other features as well. Currently I have implemented the following unique features:

  • Random mazes
  • More than one size of maze
  • Difficulty increases with each level
  • Ghost is actually intelligent and will seek you out

Please let me know what you think, what improvements might be fun, and if it doesn’t work for you.

It isn’t in finished form yet, but I think it is pretty fun as-is.
Thanks!

Hi !

It works well, no bug ! But on my 3Ghz loading level is very very slow… I think the maze generator could be optimized…

The IA is pretty well done and has good behaviors. You could now update the graphics to make the game more attracting (even if it’s very fun to play, I’ve alwais loved pacman).

Chman

Fun implementation. Didn’t experience any speed issues on a 1.8 GHz machine (Windows XP, JDK1.4, Firefox).

How about a fresher look - something more positive than the traditional black/blue Pacman theme (which probably stems from the weak screen quality of early consoles)?

Runs fine here too. The only thing that came to my attention was the weird random trails that the player icon leaves behind.

Sys: OS X 10.3.4, Java 1.4.2_04 DP3, 1.5Ghz G4, Safari v125.8

Request from my girlfriend: more levels! :smiley:

Chman, I am not sure why it takes your machine a long time to start a new level. I have a 300MHz Celeron and the small levels begin in less than a second. The two most complicated levels take about 3 seconds to generate on that machine. Note that the game does not run smoothly on that machine, the larger levels are jerky. On my 1.6 GHz laptop levels start almost instantly. What OS/browser/Java are you using? That said, maze generation is something that I could look at. Also, the process of generating a graph from the maze for the ghost to use for AI could probably use some work. Right now it works, but there is probably a better way to do it.

digitprop, since the game is still in development I have been holding off on improving the graphics, but I would love to hear suggestions on what they should look like. My mother-in-law (who uses it to distract grandchildren) thinks I should include a utility to make it easy to insert your face. I have also thought about making it themable. For now I really don’t mind the clean look of it, thought the ghost could certainly be more menacing.

ribot, I had noticed the trails before on a MacOS machine but forgot to fix that. Is it possible that the implementation of some of the drawing routines is differs by a pixel on the Mac versus Windows? Lines remain on the left while going right and on the top while going down, correct?

ribot, one other thing. Is the request for more levels a joke, since there are basically an infiinite number of levels, or does she mean that once you get to a hard level it shouldn’t loop back to the easier ones? Does she want a level larger than the current largest one? I could include a dialog at the start to determine screen resolution and allow people with lots of pixels to play enormous mazes.

I have thought about including some logic to determine whether you advance to the next level or not. Complete the level without getting caught by the ghost and you move on. Get caught once and you have to do the level again. Get caught twice or more and you go down a level. What do you think?

More levels in that once she finished the hardest one at the end of the loop, she would have to start back at the low resolution, relatively slow-paced first level (with the children’s heads).

So, basically: a larger loop size.

And yes, I only get trails when I go up and to the left.

Adding a level only takes a line of code, so it is easy to have a large number of levels. However the restriction is that I am using integers for the “block size” and for movement, so the movement for both the ghost and pac needs to be a factor of the block size. Also, pac must move faster than the ghost since the ghost is so smart that escaping him would be very difficult if he were the same speed as pac. So I have to come up with three numbers for each level:

  1. Block Size
  2. Pac speed (must be a factor of Block Size)
  3. Ghost speed (must be a factor of Block Size and less than Pac speed)

I will look at the current level layout and see if there are spot where it makes sense to add a level. I don’t know if added another level at the end is a good idea at this point, since the “last” level is almost annoyingly large already.

Another option is to re-enable the mirrored level function that I had early on and make you do each level twice, once mirrored and once not.

The AI of the little ghost guy is quite good, maybe too good (girlfriend is complaining in the background)… maybe, make it so the old ghost makes the odd mistake? :wink:

Hmm, not sure I like this methodology…

…Would it be the case that all the blocks you ate previous to death would be reset and therefore need to be eaten once again. This could get quite annoying and could end up cutting the amount of time users actually play your game for (it’s crucial that the user feels a sense of advancement…and if they are going backward all the time…this isn’t going to be the case). Anyway, just mine (and my girlfriend’s) feelings.

:slight_smile:

Nice, but a few comments:

  • Why not add more ghosts later on? I found that on later levels, it doesn’t really get more difficult.

  • Level generation takes a long time with later levels (running on an Athlon XP2200+)

  • It starts to get really jerky in later levels. Why is that? Shouldn’t be necessary I suppose…

ribot, I meant that you would complete the level normally, but that once you completed it you might have a new maze to complete that is the same size until you can pass without dying.

erikd, Thanks for the review. What OS/browser/Java are you running?

I am planning on adding more ghosts eventually. It will take some play testing to see how it works. My concern is that the ghost is so smart that having two of them would make the game near impossible, so the ghosts will probably have to make occasional mistakes.

I know why it might get jerky at the harder levels. The AI has more work to do on those levels. If I had made the AI run in its own thread then I wouldn’t have to worry about it, but that would present its own problems. I am considering running it through Jinsight in order to make informed decisions about what changes to make. That will probably help on the maze generation as well, but I am running on a slower machine than you are and maze generation is near-instant for me so I have to admit that I am confused as to why you and others have had long pauses.

Hmmm, something fishy is going on. I tried the game again using the appletviewer and there the performance problems were gone. Maze generation is instant and it’s not getting jerky in later levels.

My system: WinXP SP1, JRE 1.4.2_04, Athlon XP2200+, 512Mb, Opera 7.23

erikd, I think I know what the problem is. There are a large number of System.out.println() statements that can cause a slowdown if your java console is open. I will upload a version that doesn’t have print statements during game play.

Thanks for the info!

A new version is here:
http://www.angelfire.com/games4/anirak/tutorial/day10/index.html

I hope that is fixes the problems that have been mentioned. I have removed performance killing print statements, added six levels, and tried to fix the trails that appear on MacOS X. ribot, could you confirm that the trails are gone?

Thanks!