Marc Herschel

Marc Herschel

Gnuman

Gnuman is a satirical Pacman clone written in Java utilizing JavaFX for the graphical user interface. It features a map editor and thus allows players to design their own game worlds.

In Gnuman you play as Richard Stallman maneuvering through the labyrinth of free software development. Goal of the game is trying to collect all the git artifacts needed to release a new version of your software, while trying to dodge those cooperations hunting you, as they have no interest in you releasing a product that can possibly interfere with their carefully laid out business plan by creating a better and libre alternative.

Gnuman is freely available on GitHub!

Gnuman main menu screen

The game attempts to emulate the feeling of the original Pacman as faithfully as possible by implementing the original Pacman timings, ghost chase and scatter behavior, point system and adding the correct modifiers to Pacman specific events as described in this in-depth guide to Pacman released by Gamasutra.

Not all features of Pacman are implemented tho, the level counter is represented by a 32-bit signed Integer and will thus not overflow at 256 like it did in the original game. Even if you have the stamina to play until level 2147483647, an overflow would not introduce the game breaking glitches that occurred in the original.

Gnuman game screen Gnuman finish screen

The menu system is realized with JavaFX's FXML technology while the actual game is rendered on a canvas. Chunking is used to cause item collisions on large maps running smoothly, an example for such a map is this 125×125 map.

The ghosts work as state machines internally with the movement states WAITING, SCATTER, FRIGHTENED, CHASE, DEAD, COOLDOWN, LEAVE_BASE switching their state if either the player triggers an event like collecting the GPL License item or a timer causes the ghosts to alternate between SCATTER and CHASE. There is also a second ghost behavior state machine with the states NORMAL, DEAD, FRIGHTENED that dictates the outcome if player and ghosts collide.

SCATTER causes the ghosts to target an unreachable point out of map which sends them in an endless loop within the maps corner area. The ghost CHASE behavior is implemented like in the original game with Blinky always chasing you, Pinky trying to ambush, Inky sometimes chasing, ambushing or walking off and Clyde wandering into his scatter corner when being to close to the player. Blinky also increases his speed twice per round depending on how many dots are left in the game. This forces the player to complete as soon as possible since Blinky can overtake the player in speed at a certain point in game.

Difficulty is scaled by level via changing the ghosts and players speed modifiers, lowering the time the ghosts spend being frightened and by changing the SCATTER, CHASE pattern timings.

The above video displays the games internal workings via a debug renderer. The moving green square is the player, red is Blinky, pink is Pinky, turquoise is Inky and yellow is Clyde.

Gnuman also features a full-blown map editor that can be launched via the "Extra" menu that allows players to create their own maps. There is currently a hard limit set to 125×125 blocks as the game is not fun with larger maps.

The image below shows the map editor having a 125x125 map loaded up for editing.

Gnuman map editor

Lastly, a video demonstrating the level editor features and showing the creation of a small custom map. It also demonstrates loading the 125×125 map and how the game renders it with the static and dynamic camera renderer.