Pac-Man Diary #08

Oh my, and I thought last night was bad. Things start off okay, I manage to implement the ghosts changing into just eyes when you eat them. Simple enough, just hide the appropriate sprite leaving just the eyes. The problem started when I began programming them to go back to the hut when eaten and respawn when they get there. Unfortunately, they decide they don’t actually want to respawn, they’re perfectly happy just being eyes and they have no intention of coming out.

Of course, such behaviour is not acceptable. It takes me over an hour of scrutinizing my code and pulling my hair out to discover the problem. The ghosts target variable is being overwritten as soon as it enters the door to the hut. So they never know that they’ve actually arrived. Adding an ‘eaten’ flag to the hut check fixes the problem instantly.

At least one pair of eyes is still refusing to go back to the central hut, but I’m too tired to check it out right now. Despite these problems and the feeling of treading water I think I’m quite pleased with the overall progress.

Also, I found a nice website called Sounds of Eating with lots of Pac-Man information on it including which graphic is displayed for each level up to 255! In fact, levels 13-255 have the same Key icon. At least I can complete my Sprites bitmap now! Oh, and the article on Billy Mitchell really has to be read to be believed.