pygame is
Python
Simple DirectMedia Layer
 
 
pygame.org is
Site Swing

map loader for 'tiled' - 2.1.1

DR0ID (dr0id)

Tags:

Description

Map loader for the files generated by 'tiled', the map editor from http://www.mapeditor.org/ written in java. It loads just the data from the map file. There is a little example in the main function how to use it, but rendering is not a part of this module. It is because the map editor supports different styles of maps (orthogonal-, iso-, hexagonal-maps) and those need separated rendering techniques.

Changes

Bug fix release: fixed bug when loading properties.

Links

Home Page: http://code.google.com/p/python-pyknic/source/browse/trunk/pyknic_old/pyknic/resources/tiledtmxloader.py
Source: http://code.google.com/p/python-pyknic/source/browse/trunk/pyknic_old/pyknic/resources/tiledtmxloader.py

Screenshot


click to view original size

Releases

map loader for 'tiled' - 2.1.1 - Jul 14, 2010
map loader for 'tiled' - 2.1 - Jun 22, 2010
map loader for 'tiled' - 2.1 - Jul 23, 2009
map loader for 'tiled' - 2.0 - Jul 19, 2009
map loader for 'tiled' - 1.1 - Jul 16, 2009
map loader for 'tiled' - 1.0 - Jun 9, 2009

Comments

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

June 18, 2010 1:26pm - DR0ID - nickname: (dr0id)
Sorry for the long delay!
@ mayec: I would need to get such a tmx file to test against it and debug it. I'm often on the #pygame chat (see: http://pygame.org/wiki/info#IRC )
June 18, 2010 1:24pm - DR0ID - nickname: (dr0id)
Sorry for the long delay!

@ hobo: there is a demo integrated into the file, see (for pygame):
http://code.google.com/p/python-pyknic/source/browse/trunk/pyknic_old/pyknic/resources/tiledtmxloader.py#858

or for pyglet:

http://code.google.com/p/python-pyknic/source/browse/trunk/pyknic_old/pyknic/resources/tiledtmxloader.py#957
June 15, 2010 7:26pm - Mad Cloud Games - nickname: (madcloudgames)
are there any SIMPLE code examples that would show how to implement this?
Ive looked through the documentation and the code a few times but from the view of a novice programmer, its all very confusing. I would love to be
able to use this but I just dont know how..
March 16, 2010 5:38pm - Thomas Kowaliczek - nickname: (linuxdonald)
There you can find the lastest version of maybe that helps you.
I´m not the code of this.

http://code.google.com/p/python-pyknic/source/browse/#svn/trunk/pyknic_old/pyknic/resources
February 21, 2010 9:57am - Mayec Rancel - nickname: (mayec)
Some tmx files open fine, but when trying to decode certain .tmx files, I get the following error:

__main__ loading ...
Traceback (most recent call last):
File "tiledtmxloader.py", line 1011, in <module>
main()
File "tiledtmxloader.py", line 1001, in main
demo_pygame(args[0])
File "tiledtmxloader.py", line 839, in demo_pygame
world_map = TileMapParser().parse_decode(file_name)
File "tiledtmxloader.py", line 822, in parse_decode
world_map.decode()
File "tiledtmxloader.py", line 402, in decode
layer.decode()
File "tiledtmxloader.py", line 577, in decode
(ord(str(s[idx + 2])) << 16) | (ord(str(s[idx + 3])) << 24)
IndexError: string index out of range
November 9, 2009 3:20pm - Fredrik Corneliusson - nickname: (tomten)
Great lib!
I just converted my game to use this lib and it was actually quite simple thanks to the good quality and documentation.
http://code.google.com/p/turb-game/

Just what I needed so I could skip to doing the fun stuff in my game!
August 30, 2009 4:42am - Nils Fagerburg - nickname: (nils) - 5/5
I know I already said this, but this is really a wonderful little library. Thanks again.
August 18, 2009 1:03pm - Federico Ramirez - nickname: (fedekun) - 5/5
Awasome :)
Thanks a lot for sharing
August 11, 2009 12:11am - Alia M - nickname: (alia) - 4/5
Nice work :)
July 5, 2009 8:12pm - Nils Fagerburg - nickname: (nils)
Awesome!
Thanks for sharing this.
spotlight

 
our projects
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
 
recent releases
Sep 1, 2010


Aug 29, 2010



Aug 28, 2010

Aug 26, 2010

Aug 25, 2010

Aug 24, 2010

Aug 21, 2010

Aug 19, 2010

Aug 18, 2010

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