Yet another Pacman clone ;-)

Hi,

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 http://users.skynet.be/christophe.keller

Comments etc… welcome

Thanks.

Chris

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.

Thanks for you reply! :slight_smile:

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.

Cheers

could not find the game…the page is redirected to another one I think

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.

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. :slight_smile:

Regards,
Aaron R>

Thanks all for your input, it is greatly appreciated :slight_smile:

Here my answers on your comments:

*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…

Cheers!

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 :wink:

url is still http://users.skynet.be/christophe.keller

Note that you’ll need Java 5…

Cheers

Christophe

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

[quote]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.
[/quote]
The same here… :frowning:

Hi,

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.

Cheers

Christophe

jojoh, EgonOlsen,

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

Thanks

Christophe

Just visited

[quote]Hi,

http://users.skynet.be/christophe.keller

Chris
[/quote]
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(Class.java:1839)
at java.lang.Class.getConstructor0(Class.java:2151)
at java.lang.Class.newInstance0(Class.java:289)
at java.lang.Class.newInstance(Class.java:271)
at java.util.logging.LogManager.getFormatterProperty(LogManager.java:816
)
at java.util.logging.StreamHandler.configure(StreamHandler.java:59)
at java.util.logging.StreamHandler.(StreamHandler.java:77)
at java.util.logging.ConsoleHandler.(ConsoleHandler.java:71)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct

orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:414)
at java.lang.Class.newInstance0(Class.java:318)
at java.lang.Class.newInstance(Class.java:271)
at java.util.logging.LogManager$7.run(LogManager.java:865)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.initializeGlobalHandlers(LogManager.java
:852)
at java.util.logging.LogManager.access$1100(LogManager.java:114)
at java.util.logging.LogManager$RootLogger.getHandlers(LogManager.java:9
78)
at java.util.logging.Logger.log(Logger.java:423)
at pacman.utils.log.GameLogger.log(GameLogger.java:116)
at pacman.utils.log.GameLogger.log(GameLogger.java:91)
at pacman.utils.log.GameLogger.fine(GameLogger.java:85)
at pacman.gameobjects.sprite.pacman.Pacman.moveRequested(Pacman.java:261
)
at pacman.game.state.GameStatePlaying.handleInputPlayingState(GameStateP
laying.java:63)
at pacman.game.state.GameStatePlaying.update(GameStatePlaying.java:38)
at pacman.utils.state.GameStateMachine.update(GameStateMachine.java:28)
at pacman.game.Game.update(Game.java:72)
at pacman.game.Application.run(Application.java:120)
at pacman.Main.main(Main.java:22)
`

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…).

Cheers,
Digitprop

Hi,

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

Cheers

Christophe