How would I go about loading a map file in Pygame / Python?
I would like to load a map file in this format;
http://pastebin.com/12DZhrtp
EDIT: I\'m guess
If you're literally asking how to load a file in Python -- disregarding the pygame side of the question -- then it's very simple.
>>> with open('a.map', 'r') as f:
... for line in f:
... print line,
...
x g g g x
x g g g x
x g x g x
x g g g x
x x x x x
KEY:
x = wall
g = grass / floor
Now instead of printing each line, you can simply read through it and store it in whatever data structure you're using.
I don't know anything about pygame though -- if it has some custom function for this, I can't help with that.