Where can I find a simple, clean open-source PacMan?

Hi guys,
I’m looking for a simple, good open-source object-orientated implementation of PacMan to modify for my PhD research (which will in turn be open-source). I’ve seen a couple of PacMac clones, which are either:

  • not open source
  • not OOP at all
  • overly complex (PacDasher, while a great implementation, has about 50 Classes files at a rough guess!)
  • incomplete

I’ve looked through the forums here, and while Millenium PacMan is great, it’s not open-source, and a bunch of other ones I found were dead links.

I’m sure the people of the Java Gaming boards know of plenty of awesome PacMan games, but I’m having difficulty finding them!

Any and all help is very much appreciated!

Oops! Double post…

Well you could just write one, if you can’t find a clean open source version?

btw why do you need PacMan? is it for learning?

if you just need source code for learning the basics of how you would write a game in Java, I’d say have a look at the excellent Space Invaders tutorial over at http://www.cokeandcode.com/spaceinvaderstutorial its very good for learning.

There are good reasons I haven’t stepped up and written one myself :slight_smile:

I’m developing a new game framework for my research, and part of the story of my paper is to say “this works on games people have actually written, I haven’t just written ones myself that happen to work with this thing.” This ideally requires me to use others’ code for it.

It’s funny you should mention that Space Invaders game, as that is the first game I adapted to the framework, and it worked! I now need to take a step up in complexity, which is where PacMan came in. This has AI opponents, as well as movement constraints and such, that make it interesting. By complexity, I am specifically looking at the rules of the game. While say, Asteroids, can be quite complicated, much of it is a geometry problem, not a game design problem.

PacMan isn’t a requirement, just something along that sort of complexity, with a recognizable game to someone who will never play it (they’ll just read the paper). I’ve been trying to get PacDasher to work, but it’s reliance on an old XML parser library that doesn’t exist (JDOM instead of W3C DOM) means the entire XML parser would have to be rewritten to build, which is a pain, given that the code is already pretty complicated :-\

well ok, not sure i know of any good java pacman games that are open source, however there is one tutorial written for javafx, I know its rather different but should be pretty easy to convert to pure java, it can be found at http://www.javafxgame.com/how-to-write-pac-man-game-javafx/

Yeah, I found that one, and then considered killing a man when I found out JavaFX doesn’t make Java readable objects easily, so my framework won’t bolt on. You’re right though, converting the code to Java might be the way to go. It’s a good, simple implementation.

sry for the newby question, I am curious what exactly does you framework do?

It’s not a newbie question, I purposefully withheld it when I wrote my posts :slight_smile: I don’t want to get scooped http://www.phdcomics.com/comics/archive.php?comicid=789, you see.

I won’t tell you what it does, but I will tell you that it does it via reflection and accessing object methods, so a good architecture is important for it to work correctly. Some PacMac clones are written like they’ve been done in C, which makes it almost impossible for the framework to work.

I think I’m going to edit that JavaFX version back to POJO (Plain Old Java Objects) for the characters, and leave JavaFX on the GUI end and work with that.

fine I guess taht would suck very badly.