Pac-Man Diary #11

I extend the ‘eating ghosts’ code so that when you eat them a sound plays and the amount you’ve scored for eating it is displayed. I want it look just like the arcade version. The game now has a brief pause when you eat a ghost, this is basically to display the amount of points you’ve just received.

Hmm…the overall look of the screen doesn’t feel quite right. I decide to create a ‘Wobman’ banner at the top of the screen. This takes a while but it improves the overall look somewhat.

I think it’s time to add some sort of title screen. At the moment the game goes straight into the action. I want the title screen to show all the ghosts and points you can score. This really requires some animation, but since it’s getting late I just implement a static title screen for the moment. Looks ok. It displays a message telling you to press a key to start. Have to recode the game loop a bit to take into account this new page.

I have to play around with the fonts quite a bit before finding satisfactory ones. I think about recreating the character set used in the game, but decide this isn’t really necessary. Maybe later if I feel it needs it. I use standard ‘Arial’ for the text and ‘Courier New’ for the digits, both in bold. This looks pretty much like the original game.

Arrggg….just found a bug. Why does this always happen just as I’m about to give up for the night.

IF (about to go to bed)
generate really annoying bug
ELSE
run perfectly
ENDIF

I must remove this bit of code. If you eat the red ghost and then consume the last pill before his eyes get back to the hut, he starts the next level with his eyes disembodied from his body by 200 pixels! Looks rather amusing, but not really desirable. I manage to fix this by resetting any offsets before starting a new level.