[PURE JAVA] Macy Mae's Eating Adventure (yet another Pac-Man clone)

This is my first completed game (not my first attempt, but I may try using something like JME for bigger games later on). Its basically a Pac-Man clone, named after an old friend’s cat who always seemed to be hungry. Here I tried to clone the game the way it would have been cloned in the '80’s, when Pac-Man was still fairly new and clones tended to focus on game play rather than nostalgia and avoid copyright issues with unrelated graphics and mazes (I remember having a great clone called Jawbreaker that followed that approach, besides the real Pac-Man).

http://s20.postimg.org/3jsm74j4t/Macy_Mae_Title.png

http://s20.postimg.org/i1l81dl25/Macy_Mae_Running1.png

This was originally done with LWJGL, but is now pure Java, as packing the library in executables was ethically / legally grey, and pure Java make such files much small, more easiers convenient for the player.

Game plays is fairly straight forward and standard: Arrow keys to turn (or WASD if you prefer), pause or escape to pause, enter to start. One thing to watch out for is shift-escape (terminated the game).

Source code and binaries can both be found here:
https://github.com/BlackJar72/MacyMae]https://github.com/BlackJar72/MacyMae

Direct downloads of Runnable Files:
Java Jar: http://www.mediafire.com/download/jmicr1jyp85efba/MacyMae.jar
Windows Exe: http://www.mediafire.com/download/txkaxvgbgumilvy/MacyMae.exe

Enjoy! :slight_smile:

Loaded the game, everything seemed fit for one certain resolution (that I can’t change). It was like this the entire game.

After one death I couldn’t move at all. I had to get a game over for it to reset the controls.

Sprites had this weird overlap (shown in picture below). I don’t think this is intended I think you wanted the sprites to blend without overriding each other.

Overall, it needs some small polishing and a bugfix for that control glitch. I like the way the character moves, how he/she “slides” until he/she hits a wall. The AI for the “ghosts” feels pretty similar to Pac-Man and I really like that.

For a first completed game, this is good! Keep working on it and you’ll go far :wink:

Thanks for the feedback and encouragement. It sounds like it had more than minor gliches for you though; a problem I have is I’ve only been able to test on my own computer (where it works beautifully), so its hard to tell what might go wrong elsewhere. It looks like I need to do some fixes with graphics or maybe drop LWJGL (which is a little heavy for this) and try Java2D again? The problem with the only one ghost visible I’m not sure how to fix, but looking at how the screen is scaled might be easier. The window was not designed to be resizeable, but things are supposed to all fit into it.

I’m not sure about the control glitch I’m not sure; I can’t get it in Linux, though I have seen it not start with focus, so could it be loosing focus some how?

The ghost AIs are not exactly the same but there are similar roll; probably the biggest difference is one is set to be a guard that home in on remaining dot (or kibbles, here).

I’ll see if I can fix or else re-write the graphics. :-/

Thanks again for the feedback.

Maybe your blending can be fixed with


glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
// do rendering for sprites
glDisable(GL_BLEND);

I’m not great with barebones GL (I used to use slick and currently am using libgdx) but the blending function makes it so when you render more pixels on top of existing ones, it appears overlaid and not overwritten.

Good luck!

Well, I’m already using that (minus the glDisable, which turns blending off); this blends one sprite with the background (allowing transparency) but doesn’t seem to work with more than two texture. I don’t know if there’s another blend function that would work better. Apparently (based on googling) it blends the top and bottom texture and leaves out any in between, and solutions others have found are complex and assume multiple textures being combined to skin a model (not attached to separate VBOs. I wonder if this could be done any better with Java2D, or with some other library?

OK, I’ve been on other projects and life in general and away from this for a bit, but I finally got around to fixing the window size problem. The window now starts out slightly bigger and is resizeable (if the start-screen graphic fits correctly, the game should too).

The ugly rendering of super-imposed whisps is still there, though I think I know how to fix this now when I get around to it – basically do so pseudo-low-level bit-blitting like processing in an array and then turn that into a texture for a single rectangle (or a native Java graphic, the idea of porting to pure Java is still something I’m considering as using lwjgl here is a little like swatting flies with a Katana and makes files way bigger than they should be).

I’d left this and been focusing on other things. But, I didn’t want to leave this in a half-*** state. So I went ahead and fixed some things.

The UI has been re-written to in pure Java. That makes the jars and exes much, much small – the size the should be. This also make it much more portable, and it will run on machines that it wouldn’t before.

In addition, the wisps (“ghosts”) no longer cover each other; all graphics are properly blended, allowing sprites to move through each other. Also, the window can now be resized as the player likes and the game will always fit neatly and exactly inside it. The is also a proper icon that shows up properly.

Generally many small improvement, but I probably won’t be adding sound or bonus items, as I think I’m done with this. It fun to play, for me anyway, and that’s good enough. This project probably won’t go any further.