About Shaun LeBron (twitter: @shaunlebron)


Ludum Dare 33
Ludum Dare 28

Shaun LeBron's Trophies

Shaun LeBron's Archive

Pac-Man ghost A.I. puzzle

Posted by (twitter: @shaunlebron)
Sunday, August 30th, 2015 3:53 pm

GH4ST is a turn-based puzzle that uses the actual ghost A.I. from Pac-Man. Coordinate the ghosts to catch Pac-Man before he reaches the fruit.

Post Compo version includes more levels, character animations, the A.I. visualizations seen below, and smarter Pac-Man A.I.



The Concept

The original ghost A.I. is surprisingly simple and rich, which you can read about in the popular Pac-Man Dossier. But it’s just not easy to use this information in-game while everything is moving so fast. I’ve long wanted to build a turn-based version where you can think about every move, like Chess maybe.

Brainstorming the Theme

The “You are the Monster” theme made me think of this concept from the ghost perspective. The challenge was to keep the interesting Ghost A.I. while allowing the player to control them. These goals seemed opposing at first.

I initially wanted to let the player place the ghosts on the board to strategize, then to click “Play” to see how it plays out. (I was imagining something like ChuChuRocket here):


Obviously, there has to be some restrictions on ghost positions to give poor Pac-Man a chance. I eventually ditched this problem for something that struck me as elegant– the player should just choose which ghost to move on each turn by pressing a number:


(Pac-Man is walled-off for the purpose of the gif above so we can just illustrate ghost movement)

This seemed to work okay, especially with allowing the player to Undo their steps if they had made a mistake (a la PuzzleScript)

At the 48 hour mark, I had the core mechanics working and some levels illustrating the A.I. behaviors of the ghosts and a new A.I. for Pac-Man since something has to control him. I went back for the Post-Compo version to really bring out the hidden beauty of these behaviors through visualizations, and fixed some A.I. problems, and added more levels.


Though I think I failed to create a rich, balanced mechanic from the ghost perspective (it seemed to break down pretty fast), I think there’s more potential in letting the player control Pac-Man, the way God intended of course! It excites me to think about integrating the ghost-reversing timers and power pellets in this turn-based mode. I won’t be pursuing this for a while, but I’d really like to see Namco or someone else do it.

Oh, and I may write another post about technical implementation details. ClojureScript (amazing language!), React (simple UI model), SVG for visualizations, and CSS for sprite animations frames and movement. cool stuff

Thanks for reading!
-Shaun (@shaunlebron)
GH4ST entry page

A 1D game

Posted by (twitter: @shaunlebron)
Monday, January 6th, 2014 5:08 pm

Everyone knows that a photograph is a 2D image of a 3D world. Take this spinning cube for example:

When the colors of light travel from the object to the camera, they pass through and mark the photo, creating the colored pixels of the image. You can imagine the same scenario from a top-down perspective. Incidentally, this is the same as imagining a 1D image of a 2D object.

You can imagine a cylinder-shaped photo as a means to capture a panorama in a circle, again
shown in a top-down illustration, but with more objects.

This is the basis of my 1D game entry BL1ND. Play the early concept here:

(I will be developing a full version of BL1ND this year. Follow @shaunlebron)

[cache: storing page]