I'm working on a small project in pygame that will eventually end up being a top-down, open world fantasy game (think final fantasy 1). I am working on the basics of open world travel, and I've got most of it down. The only issue is that sometimes my background is blitted before the player (which is good) and sometimes my background is blitted after the player (very bad).
It seems like it only blits correctly the first time you run the code after updating the mapping.py file, otherwise it blits incorrectly. (Something to do with the mapping.pyc file?) Can someone please explain what's going on and how I can fix this? My code is in a zip file below, since I'm not sure what area exactly to pin down as the "problem area."
Zip file with python source files (just run "main.py") can be found here (from sourceforge).