Skip to content

Advancing PyMan (using python’s pygame to recreate pacman)

by mat on February 18th, 2010

A while back I followed a few tutorials on creating a pacman game in python using pygame. I took the resulting code from these tutorials and added several enhancements. Unfortunately I haven’t had enough time to continue with the code, so hopefully this code is of use to someone learning python to play with and further enhance (Who knows might end up feature complete!).

Screen shot of PyMan in action

Screen shot of PyMan in action

Enhancements over original code

  • start menu
  • sounds
  • multiple ghosts
  • not having to hold down a directional button constantly
  • can press a direction before a turn and will turn at next opertunity (like real pacman)
  • probably more stuff that I’ve forgotten about by now

Source
Source Files – The source and files, to run the game just run “python PyMan.py”

References
I believe the site where I got the original code from was learningpython.com (not 100% sure) and the following links to the tutorials:
Tutorial 1
Tutorial 2
Tutorial 3

One Comment
  1. Tay permalink

    After putting in the code I got this:
    “Traceback (most recent call last):
    File ‘/home/pi/Test Games/PiMan.py’, line 99, in
    MainWindow.MainLoop()
    AttributeError: PyManMain instance has no attribute ‘MainLoop’”

Leave a Reply

Note: I am currently writing my thesis so probably wont have time to reply to your comment
Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS