Here's a PacMan style game made out of very simple events and movements. It's not commented and the code structure is not very optimised, but it gets the job done. Also note it does not emulate PacMan identically, the original game had better AI and grid movement. I'm not looking to make it a perfect example as I coded it over 10 years ago, however hopefully some beginners can learn from this.

lumpys_hunt_open_source.mfa

Requested by a user on the forums.