Mobile Pac-Man: Part 4 - Version 1.0
Introduction
It's finished! Well, version 1.0, at least. It took me longer than I expected, that's for sure. I ran into a few issues and had to figure a few things out, but I think I ended up with something that was pretty fun.
Start of game on emulator
Game Features
I haven't implement everything I wanted to yet, but the basic game play is there. Pac-man eats dots and earns points for it. A new ScoreBoard Sprite shows your score and remaining lives. There are now four ghosts out to attack Pac-man. When one of the big dots is eaten, the ghosts change appearance and become edible for a short period of time. When Pac-man eats a ghost, the ghost turns into a pair of eyeballs that wander aimlessly until returning back to normal in the center of the board. The board resets after all the dots are eaten. Lastly, a player will earn an extra life after every 3000 points scored.

Ghosts become edible after Pac-man eats a big dot
Artificial Intelligence
Or lack there of. So Blinky and company didn't end up being the smartest Pac-man hunters around, but that could change in the future without a ton of work. The plan was to use the shortest path finding algorith called A*. Thanks to Eric Marchesin, I was able to get a version for C# that I could plug into my application. I defined 50+ nodes on the game board that the ghosts could travel between. The ghosts would know which node was closest to Pac-man, and use A* to find the best path. Then after a period of time, the ghost would retarget and try again. Unfortunately, some pieces of the code don't work on the Compact Framework. Instead of taking the time to rework the code, I punted on full fledged A*, but still used the nodes and arcs defined. When a ghost arrives at a node, it simply randomly chooses one of the outbound arcs defined to determine what node to travel to next. It ended up working out pretty well.
Ghosts become aimless eye balls after being eaten by Pac-man
Peformance Tweaking
I had to do a good bit of performance work to get the game to play at the speed and smoothness I wanted. Clearly, the screen painting had to be efficient as discussed in the previous posts. But even repeatedly looping through lists of Sprites to detect collisions had to be made as efficient as possible. That became more obvious when the third and fourth ghosts were added.
Game Over!
Offline Development
One issue that threw me for a loop was an inability to deploy to the emulator in certain circumstances. The common thread seemed to be a lack of a network connection while doing development. It appears that you can't deploy because the IDE uses a TCP connection to the emulator to copy the files and connect. I didn't spend too much time looking into this, so don't know this for sure, but I think that's what was going on. I want to try to figure out a work around, of course. If I figure something out, I'll be sure to post it.
Try It Out
You can download the game here if you would like to try it out. I will, of course, need to clear my conscience by saying that by downloading the game, you are trying out this app at your own risk. I take no responsibility for anything bad that happens. Of course, I don't think you'll have any issues. You will be prompted to trust the app the first time you run it. That screen sometimes screws up the painting. Also, it's worth noting, that the game takes a few seconds to load after pressing New Game.
Feel free to post back if you try it out.