pygame is
Simple DirectMedia Layer is
Site Swing
pyg Map Maker

pyg Map Maker - 0.5 - Prev

Alex (moptan)



A 2d Map Editor made in pygame.

Not quite done yett, but here is a preview atleast.

The Map Maker lets you use tilesets to build your own custom maps and environments which can be exported into either a map file or an image file.



I would recommend to not make any large maps with the 0.5.x version, as I am current remodeling the whole source code for the next version, and i'm not sure i will manage to make maps from 0.5.x compatible with 0.6.




  • Added ability to draw and store collision boundary
  • Map files from 5.0 is compatible with 5.1
  • Instructions on this page have been added to a text file in the .zip



Ctrl + L: Load map file or image file

Ctrl + S: Save map file or image file

wasd: Move the tileset on the left hand side

Arrow keys: Move the tileset on the right hand side

alt + left click and drag: Draws a red rectangle that visualizes collision boundary

alt + right click: Removes collision boundary's

Click on a tile on the left hand side, and then paint this tile to the right hand side by left clicking and/or dragging.

The painted tiles can be removed by right clicking and/or dragging.


Current Special Features

  • Multilayers on single tiles
  • Boundary system for collisions
  • Window is resizable

Comming Features

  • Map Handler class for handling user made maps


  • Code is still a bit messy
  • Currently locked at 32x32 tiles
  • multi layers currently locked at max 3

Thanks to



Home Page:


click to view original size


pyg Map Maker - 0.5.1 - Jan 6, 2010
pyg Map Maker - 0.5 - Prev - Jan 5, 2010 account Comments

If you wish to leave a comment with your account, please sign in first.

April 21, 2010 10:55am - Alex - nickname: (moptan)
Development has been on hold for quite some time now, as school is taking up most of my time. But i'll see if i can take some spare time out now and then to get version 6 punched out.
Got some interesting ideas and thoughts for further development aswell.
Untill then, cheers all.
January 19, 2010 11:21pm - Alex - nickname: (moptan)
Hey! matthew and Marcin.
Really nice to see ppl take an interest in my work.

I'll see if we can get something going once the next update is ready.
I can't really give any precise ETA when this will happan, but it won't be to long!

Untill then, chat me up here or on pygame IRC.
January 17, 2010 11:19am - matthew smith - nickname: (durandal) - 4/5
I wrote in an implementation of your map files into my current project. One thing that I've done is to make local_tile a subclass of pygame.sprite.Sprite and add the xPos and yPos to the rect to make it play nicely with sprite groups and pygame.display.update(). If you'd like any help, please let me know- durandal at Looking forward for the next update.
January 16, 2010 9:59am - Marcin - nickname: (orneo1212)
If you want i can help you on this project. I have some practise in 2d maps and editors. please contact if you want
January 10, 2010 5:43am - Michael Arevalo - nickname: (sandhandle)
Yes, that did the trick, thank you! :D
January 9, 2010 9:53am - Alex - nickname: (moptan)
sandhandle, if i understood your question.

click edit on your project
scroll a bit town
click "[Add/Remove rich text editor]"
January 9, 2010 4:56am - Michael Arevalo - nickname: (sandhandle)
If you don't mind me asking, how do you format your description?
January 8, 2010 12:37pm - Alex - nickname: (moptan)
The boundry system is not moving properly around with the painted tiles, will be fixed in next release.
January 8, 2010 9:01am - Ivan - nickname: (citizenbane)
Alex: I ended up uninstalling 3.1 and then installed 2.6.
January 8, 2010 8:25am - Alex - nickname: (moptan)
Speaking of Python 3.1, how did you solve tk.tiledialog?

Changes to exit strategy looks like an improvement, will add it, thanks :)
January 7, 2010 10:49pm - Ivan - nickname: (citizenbane)
Sounds cool, Alex.
Also, I wanted to say that I'm using Python 3.1 for this (with the latest pygame). I had to use tk.filedialog, for example, instead of tkFileDialog. Not sure if you were aware of that.

I also changed the exit strategy a bit:

if event.type == KEYUP and event.key == K_ESCAPE or event.type == QUIT:
January 7, 2010 10:19pm - Alex - nickname: (moptan)
I am currenty remodeling the source, trying to structure it a bit better along side doing some minor changes to the internal handling of tiles and such, to make it easier to add some features i'm thinking of :)
January 7, 2010 10:16pm - Alex - nickname: (moptan)
Nicely done :D
January 7, 2010 10:03pm - Ivan - nickname: (citizenbane)
Hey, I added the scroll wheel for the tiles and paint (just up/down):

if event.type == MOUSEBUTTONDOWN:
mouseX, mouseY = self.mouse_pos()
if mouseX < self.tileset_surf.get_width() and mouseY < self.tileset_surf.get_height():
if event.button == 5:
self.tileset_movey = self.tileset_movey - self.rect_y
elif event.button == 4:
self.tileset_movey = self.tileset_movey + self.rect_y
elif mouseX > self.center_distance_width and mouseY < self.paintset_surf.get_height():
if event.button == 5:
self.paintset_movey = self.paintset_movey - self.rect_y
elif event.button == 4:
self.paintset_movey = self.paintset_movey + self.rect_y
if self.alt_pressed == True:
January 7, 2010 9:46pm - Alex - nickname: (moptan)
Hey there :). Glad you liked it! :D
Have you tryed using the arrow keys and/or the wasd keys?

When it comes to using the mouse wheel, that shoulden't be any problem to implement, if so. My only consern is its mostly up and down, and not left and right. But i'll think about it =)

In the meantime check out the instructions for all current features :).
Another update will be released soon.
January 7, 2010 8:59pm - Ivan - nickname: (citizenbane) - 5/5
Hey, as a total newb to Python, I'm really diggin' this.
It's helping me to learn the language. :)

I'd love to be able to use my mouse wheel to scroll through the tiles and map.
January 6, 2010 7:07pm - Alex - nickname: (moptan)
On third thought, next will probably be map handler class.

Next release will support more than 3 multilayers.
January 6, 2010 6:43pm - Alex - nickname: (moptan)
On second thought, next will be some kinda interface for changing certain values
January 6, 2010 6:18pm - Alex - nickname: (moptan)
Boundary System drawing and storing have been added in 5.1.

Next will probably be a class for handling these map files in games.
January 6, 2010 1:34pm - Alex - nickname: (moptan)
Thanks =), good point there, could cut dependancy to pygame.color then, so changed it all to numbers aswell.

Boundary System is comming soon.
January 5, 2010 3:09pm - eric - nickname: (dexter) - 5/5
maybe it is the letter case across versions or something but spelling out white is crashing this in python 2.5 + python. I replaced with 0,0,0 and then it worked. nice looking program.

our projects welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
recent releases
Jan 31, 2017

Jan 24, 2017

Jan 19, 2017

Jan 18, 2017

Jan 7, 2017

Dec 30, 2016

Dec 8, 2016

Nov 28, 2016

Nov 27, 2016

... more!
for pygame related questions, comments, and suggestions, please see help (lists, irc)