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 Files – The source and files, to run the game just run “python”

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


  1. Tay

    After putting in the code I got this:
    “Traceback (most recent call last):
    File ‘/home/pi/Test Games/’, line 99, in
    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.


    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!

  5. best electric pressure Cooker Recipes

    excellent issues altogether, you just gained a new reader.
    What could you recommend in regards to your put up that
    you just made some days ago? Any sure?

  6. dikbut


  7. aigner

    What’s up to every body, it’s my first go to see
    of this blog; this blog carries awesome and
    in fact good stuff for visitors.

Leave a Comment

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