Pac-Man is complicated, but easy to figure out. I has been completely documented in how it works in the
Pac-Man Dossier.
I used that page to create my own clone of Pac-Man that works about 90% like the original complete with ghost AI. You can have this code to check out. Mind it's a few months old and I've learned new Lua tricks since then so it may not look optimized. In fact I haven't even looked at the code in months so...
- Pac-Man.love
- wokka wokka wokka wokka
- (7.32 KiB) Downloaded 107 times
The main things I didn't implement are collisions to kill, levels, score and "corner cutting". (You'll read about it in the Dossier. It's very integral to mastering the game. If you can't get cutting in, you fail! FAIL!! MUAHAHAHAHA!!!!! Fail.) And because of that, I do not suggest you use this code at all. Rather learn SOME things from it. It's buggy and not accurate 100%. Only 90%. Also, this was before I learned how to use framebuffers to scale the graphics so sorry for the 1:1 scale of pixels. Man, CRT's were low resolution back then.
READ THE DOSSIER!
Edit: Looking back, it's about 10 months old. Man, where did this year go? I made this in December! I had recently broken up with my girlfriend and was feeling good so I was able to concentrate.