pygame is
Python
Simple DirectMedia Layer
 
 
pygame.org is
Site Swing
pyMap - 2D Tile Mapping

pyMap - 2D Tile Mapping - 0.9.4

Ryan Ledford (exsolacyst)

Tags:

Description

Documentation of Application Features are included with the download. See mapfileformat.txt to see how to read a map file if you want to use it for loading maps into your own applications. Written with: python 2.7 pygame 1.9. This is something I've been working on for my own development of 2D game worlds. It works well for me and is still in development, but I would like suggestions on what other features I could add or change. Im still working on the UI. Launch by double-clicking the pyMap.py file

Changes

Added more UI elements. Added Save/Load capability for tile objects. Tile objects can be created by selecting a group of 'filled' cells (must form a solid rectangle), press the 'M' key and provide a valid name for the object. Changed some icon images. Application now exits when the app window is closed. Fixed a bug that crashed the app when unallocated tile selector space was clicked.

Links

Home Page: http://code.google.com/p/pymap/
Source: http://code.google.com/p/pymap/downloads/list
Windows: http://code.google.com/p/pymap/downloads/list
Mac: http://code.google.com/p/pymap/downloads/list

Screenshot


click to view original size

Releases

pyMap - 2D Tile Mapping - 0.9.4 - Feb 25, 2013
pyMap - 2D Tile Mapping - 0.9.3 - Feb 14, 2013
pyMap - 2D Tile Mapping - 0.9.1 - Feb 7, 2013

Pygame.org account Comments

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

February 17, 2013 5:40am - Ryan Ledford - nickname: (exsolacyst)
Thanks again Paul,
I will be keeping those suggestions in mind as I push for my next release. I appreciate the feedback very much.
I debated, when first starting this programming project, about how I was going to integrate selecting and filling / painting onto the canvas. When I thought about and implemented the current selection method, it seemed like a convenient way of handling multiple selections of any size throughout the entire editing area and filling those selections with tile(s). I do not have a "Paint Mode" because there can be any number of tiles selected but I still would like to provide another way to place tiles if the current way is not user-friendly enough.
February 16, 2013 5:28am - Paul Paterson - nickname: (paulpaterson)
Looking good. Some suggestions below ...

You have some hard-coded Windows specifics in there that need some tweaking to get to run on Linux.

1. pyCanvas.py line 108: use os.chdir(os.path.join(cwd, 'Button_Images')) instead of manually joining the path
2. Some files have upper case filename extensions (".PNG") but are referenced in the code as ".png"
3. pyCanvas.py line 982: as above, os.chdir(os.path.join(cwd, 'Tilesets'))

Maybe I missed something but the tile placement approach was a bit unintuitive - I had to read the documentation to see how to place a tile. I expected that highlighting a tile in the tileset and left clicking on the map would place the tile but this just seems to select. I had to use F (fill) to fill selected squares.

Also on the intuition front, the check-box for selecting which layer is being edited feels a bit weird. A check-box implies you can select multiple items (layers). I would suggest giving each layer a name and then highlight the active layer.

The Window close button doesn't work (pygame.event.get(pygame.QUIT)) so you have to CTRL-C it to exit.

February 14, 2013 4:15am - Ryan Ledford - nickname: (exsolacyst)
I updated 0.9.3 with those lines removed and it works on Win7 for me anyway. Let me know if you find anymore bugs.
February 14, 2013 4:07am - Ryan Ledford - nickname: (exsolacyst)
Michal,
In the pyCanvas.py file there are three lines that can be commented out. It does not give me problems having it in there and I'm on Windows 7 as well. Comment out lines 845-847 so that it looks like this.
#evt = pygame.event.Event(pygame.KEYUP)
#evt.key = pygame.K_LCTRL
#pygame.event.post(evt)
I was posting key events before I wrote the pyMain.py file in order to work around some keystroke issues... sorry about that. I would say check out the new version but I think those lines of code are still in there, just on different lines since I've added quite a bit to the pyCanvas.py file.
February 13, 2013 11:43pm - Michal Rapacz - nickname: (michail) - 5/5
Traceback (most recent call last):
File ".\pyMap.py", line 4, in <module>
pymap.run()
File "C:\Users\michail\Downloads\pyMap_0.9.1\pyMain.py", line 200, in run
self.handle_events()
File "C:\Users\michail\Downloads\pyMap_0.9.1\pyMain.py", line 115, in handle_events
self.canvas.load_tileset_prompt(screen)
File "C:\Users\michail\Downloads\pyMap_0.9.1\pyCanvas.py", line 845, in load_tileset_prompt
evt.key = pygame.K_LCTRL
AttributeError: 'Event' object has no attribute 'key'

I get this message whenever I try to load a tileset; I'm running Windows 7. Strange...
The code looks ok for me at this place.

Anyway, it seems to be a great job. The UI is clear and fine, however, it would be a nice feature to be able to resize the window. It barely fits on my 1366x768 laptop screen.
February 11, 2013 4:22am - Ryan Ledford - nickname: (exsolacyst)
Thanks for the quick reply Paul. Those are great suggestions and some I've planned on putting in the pyCanvas class. If you look in the source file there are a couple things that resemble grouping and applying properties to map objects. If you or anyone else has had a chance to try to make a map I'd also like to know how easy / hard it is to use this program and how I could improve the user interaction aspect of it.

-ESC
spotlight

 
our projects
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
 
recent releases
Apr 16, 2014


Apr 13, 2014

Apr 9, 2014

Mar 18, 2014


Mar 15, 2014


Mar 14, 2014

Mar 13, 2014

Mar 11, 2014

Mar 9, 2014

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