Pacman Unofficial Release v0.1a

hey,

me and my friend made a pacman game its not done yet but we put an unofficial release 0.1a on the site tomorrow we will get the completed version up…

http://www.netconplus.com/antstuff/pacman.php

Mac OS X 10.3.2

java -jar Pacman_v0.1a.jar
Exception in thread “main” java.lang.IllegalArgumentException: Invalid DisplayMode: Cannot change DisplayMode when not in Full Screen
at apple.awt.CGraphicsDevice.setDisplayMode(CGraphicsDevice.java:170)
at FullScreenFrame.(FullScreenFrame.java:96)
at GameManager.main(GameManager.java:20)

The funny thing is that it goes into fullscreen mode and changes the display mode, then goes back to the desktop and prints this message… weird.

ok ill look at my code… is there arent any weird errors that are known when running on a mac are there?

thanks for trying it out… ill try and get it fixed soon :smiley:

Works for me - although I remember that pacman never was such a FAST game … very hard to control…

And … what I personally dislike … it went fullscreen and I couldn’t stop it (ESC or so)

ok thanks for the feedback…

swpalmer you are running the latest version of java right?

the speed wasnt really my idea… we had it running slower but we got to good at it, and anthony suggested that we speed it up i will maybe add a difficulty setting or something so that u can select the speed.

the their is currently no exit button from the gameplay screen, but if u die or complete the level the u can exit, i think i forgot to add the buttons to the gameplay thing in the first place lol…

i will keep messing with the fullscreen code. thanks :smiley:

The latest available to OS X. 1.4.2 DP 2

Post your fullscreen code as it may very well be an OSX fullscreen bug and I will post it to the Apple java-dev lists. I believe you’re the 3rd person I’ve talked to in 48 hours who is having issues with fullscreen on OSX :slight_smile:

sweet thanks !

here is the code where i goto fullscreen mode:


device = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
            GraphicsConfiguration gc = device.getDefaultConfiguration();
            
            f = new FullScreenFrame(gc);
            f.setIgnoreRepaint(true);
            f.setBackground(Color.black);
            f.setUndecorated(true);
            f.setResizable(false);
            f.setVisible(true);
            device.setFullScreenWindow(f);
            f.setVisible(true);
            
            if (device.isDisplayChangeSupported()) {
                  oldDisplayMode = device.getDisplayMode();
                  
                  device.setDisplayMode(new DisplayMode(1024,768,32,DisplayMode.REFRESH_RATE_UNKNOWN));
            }
            else if (!device.isDisplayChangeSupported()) {
                  device.setFullScreenWindow(null);
                  f.setVisible(true);
                  JOptionPane.showMessageDialog((Component) null, "Sorry, but your hardware does not currently support display mode changes required for this game","Render Engine",JOptionPane.ERROR_MESSAGE);
                  System.exit(1);
            }
            
            f.createBufferStrategy(2);
            strategy = f.getBufferStrategy();
            
            if (!strategy.getCapabilities().isPageFlipping()) {
                  device.setFullScreenWindow(null);
                  device.setDisplayMode(oldDisplayMode);
                  
                  JOptionPane.showMessageDialog((Component) null, "Sorry, but your hardware does not support the required graphics accerleration required by this game","Render Engine",JOptionPane.ERROR_MESSAGE);
                  System.exit(1);
            }


Hi,

runs fine on my machine. Good work!!!

Nice pacman variation :slight_smile:

A few suggestions:

  • Make collission detection a bit less strict; you die when you are only close to a ghost.
  • Make the gosts look where they’re going, like in the original.

But all in all, great work!