Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (595)
Games in Android Showcase (168)
games submitted by our members
Games in WIP (646)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Yet another Pacman clone ;-)  (Read 3381 times)
0 Members and 1 Guest are viewing this topic.
Offline galapiat

Senior Newbie

Java games rock!

« Posted 2004-07-11 11:09:24 »


I've posted a first public beta of a Pacman I've written. It features not too bad gaphics :-), normal and power pills, ghost normal wandering and afraid states, and possibility of user-defined levels.

The address is

Comments etc... welcome



Christophe Keller
Offline JuddMan

Senior Devvie

Medals: 1

Your Ad Here

« Reply #1 - Posted 2004-07-13 17:45:07 »

plays ok. Do you use swing components like jlabels for all the tiles?

problem: after dying you can come back under a ghost and die again right away.
Offline galapiat

Senior Newbie

Java games rock!

« Reply #2 - Posted 2004-07-14 06:15:30 »

Thanks for you reply! :-)

No, I don't use JLabels for the tiles, in fact the map area sits in its own JPanel, and I draw on it using java2d. Each tile and sprite in fact has its own BufferedImage and I use a BufferStrategy to have as much hardware acceleration as possible.

I'll add the problem of pacman dying under a ghost to my todo.


Christophe Keller
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline luisoft

JGO Coder

Projects: 6
Exp: 10 years

Java games rock!

« Reply #3 - Posted 2004-07-14 10:13:27 »

could not find the game...the page is redirected to another one I think
Offline Foobarth

Senior Newbie

wannabe game developer

« Reply #4 - Posted 2004-07-14 18:56:59 »

Perhaps my judgement is flavored by playing too much of my own pac-man clone, but it seems that it moves too slow.  It also seems to me that some overlap with a ghost show be allowed.  You get nicked in this one and you die.  Perhaps this is what you want, I like the close calls with a little overlap of the original.  It also provides a sense of impending doom when the ghost is chasing you, on top of you, and you know you can't get away.
Offline dranonymous

Junior Devvie

Hoping to become a Java Titan someday!

« Reply #5 - Posted 2004-07-14 19:06:07 »

Great first beta!

I didn't hear any music, is there supposed to be?

Resizing of the JFrame should be turned off if the game board doesn't support resizing.

Controls feel solid.  Smiley

Aaron R>
Offline galapiat

Senior Newbie

Java games rock!

« Reply #6 - Posted 2004-07-16 19:43:38 »

Thanks all for your input, it is greatly appreciated :-)

Here my answers on your comments:

* luisoft: there is only one page on my website, but I can give you the direct link to the jar file: Let me know if it works...

*Foobarth: I agree that the velocities of the characters could need some tweaking, but I plan to do this more toward the end of the project. You are correct about the overlapping, it can be quite annoying when you turn a corner and a ghost still kills you. For this I think I'll need to be able to define multiple collision rectangles per game object, it's on my to do...

* dranonymous: there are no sound fx and music yet, they are also on my to do. The issue of frame resizing is not yet entirely settled in my mind, I think I'll need to have a look at other clones to see which strategy gives the best results...

Thanks all...


Christophe Keller
Offline galapiat

Senior Newbie

Java games rock!

« Reply #7 - Posted 2005-01-07 21:14:54 »

Hi folks,

After several months of playing around with the code I've released an new version of SwingPacman, with the following enhancements:

* Sound!
* Tunnels
* Completly rewritten and more realistic collision detection (pixel-perfect and distance collisions)
* New ghost AI: cut-off ghost
* Ghost restart in nest after loss of a live
* New level included
* Many many bug fixes (but still some lurking ;-)

url is still

Note that you'll need Java 5...



Christophe Keller
Offline jojoh

JGO Knight

Medals: 5
Projects: 7

« Reply #8 - Posted 2005-01-08 11:00:10 »

Quite OK version of PM. I agree on that a bit faster would be nice. When having sound on, the game will freeze after a while, couldn't figure out what was triggering it... With sound turned off it seemd to work fine. Pretty cool with the tunnel idea.

Spec: Java 1.5 WinXP 2.6GHz

Offline EgonOlsen
« Reply #9 - Posted 2005-01-08 11:02:54 »

When having sound on, the game will freeze after a while, couldn't figure out what was triggering it... With sound turned off it seemd to work fine.
The same here... Sad

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline galapiat

Senior Newbie

Java games rock!

« Reply #10 - Posted 2005-01-08 15:06:47 »


Thanks for your feedback. I'll have a look at the freezing with sound on. Velocities should be no big deal, I can tweak them in a config file.



Christophe Keller
Offline galapiat

Senior Newbie

Java games rock!

« Reply #11 - Posted 2005-01-10 09:45:14 »

jojoh, EgonOlsen,

May I ask you what kind of soundcard you have? I couldn't reproduce the freezing problem with sound on...



Christophe Keller
Offline digitprop

Junior Devvie

« Reply #12 - Posted 2005-01-10 14:21:38 »

Just visited


using Firefox under Windows XP, and go the Javascript message 'This page does not support your browser. A browser version 4.0 or higher is required!' which is not nice, Firefox being one of the latest browsers.

What is much worse, though, is that the message keeps popping up every time I click 'Ok'.

Other than that, puuulleez make it webstartable, and lower the requirements to JRE 1.4.x. I think nobody except developers has JRE 1.5 installed by now, and this will probably not change for quite a while.

Originally I had started the game under the beta version of JDK 1.5.0, and got an exception when I first pressed any cursor key:

java.lang.NoClassDefFoundError: java/lang/Appendable
       at java.lang.Class.getDeclaredConstructors0(Native Method)
       at java.lang.Class.privateGetDeclaredConstructors(
       at java.lang.Class.getConstructor0(
       at java.lang.Class.newInstance0(
       at java.lang.Class.newInstance(
       at java.util.logging.LogManager.getFormatterProperty(
       at java.util.logging.StreamHandler.configure(
       at java.util.logging.StreamHandler.<init>(
       at java.util.logging.ConsoleHandler.<init>(
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
       at java.lang.reflect.Constructor.newInstance(
       at java.lang.Class.newInstance0(
       at java.lang.Class.newInstance(
       at java.util.logging.LogManager$
       at Method)
       at java.util.logging.LogManager.initializeGlobalHandlers(
       at java.util.logging.LogManager.access$1100(
       at java.util.logging.LogManager$RootLogger.getHandlers(
       at java.util.logging.Logger.log(
       at pacman.utils.log.GameLogger.log(
       at pacman.utils.log.GameLogger.log(
       at pacman.utils.log.GameLogger.fine(
       at pacman.gameobjects.sprite.pacman.Pacman.moveRequested(
       at pacman.utils.state.GameStateMachine.update(
       at pacman.Main.main(

Under the current JRE 1.5.0 everything works fine. I wasn't aware that Sun had added an Appendable to the lang package between the beta and the final version - nice.

As for the game itself, it is quite faithful to the original, as far as I remember, but I agree with the others that it feels very slow (more like 'wading-through-honey-man' than Pacman...).


M. Fischer .
Offline galapiat

Senior Newbie

Java games rock!

« Reply #13 - Posted 2005-01-12 19:20:25 »


In fact I discovered this week that the statistics tracker I used had been "upgraded" since I inserted it in my webpage and installed spyware. I wasn't aware of this as the spyware only installed under Internet Explorer (I use Opera).

I am really sorry if this caused problems to anybody.

As for the javascript error you got, it was caused by the code of the tracker. You shouldn't have a problem now, I have removed the statistics tracker that caused the problems from my webpage.

I plan to make the game java webstartable for the next beta, I haven't found time yet to read the java webstart docs.

As to make the game runnable under jdk1.4, I am not sure if this is feasible easily, as I am using XPath facilities which I think were not available in JDK 1.4. I'll look into this however.

As for the game character velocities, I already toyed with them a little bit in the sources of my next release, but that has revealed me another bug I'll have to fix first before changing the velocities.

Thanks very much for your feeback



Christophe Keller
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

deepthought (49 views)
2015-06-30 15:39:44

deepthought (56 views)
2015-06-30 15:39:09

deepthought (65 views)
2015-06-30 15:36:52

Za\'Anzabar (42 views)
2015-06-29 05:44:54

TritonDreyja (49 views)
2015-06-24 17:10:40

CopyableCougar4 (49 views)
2015-06-23 00:34:45

BurntPizza (58 views)
2015-06-21 20:36:46

cookiecompiler (98 views)
2015-06-11 15:42:53

cookiecompiler (57 views)
2015-06-11 15:41:14

NegativeZero (81 views)
2015-06-11 09:49:18
How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!