Blog

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

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

4 Comments

  1. Tay

    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'”

  2. y8 yepi

    Aw, this was an incredibly good post. Taking the
    time and actual effort to produce a superb article… but what can I say… I put things off a whole lot and never
    seem to get nearly anything done.

  3. alternativerockhoodies.com

    If some one wishes to be updated with most recent technologies then he must be visit this web site and be up to date all the time.

  4. Do you mind if I quote a few of your atticles as long as I provide credit
    and sources back to your website? My blog is in the very same area of interest as yours and my users
    would certainly benefit from a lot of the information you provide here.
    Please let me know if this alright with you. Thanks!

Leave a Comment

Your email address will not be published. Required fields are marked *