Skip to content
/ PyTMX Public
forked from bitcraft/pytmx

Python 3 Port of PtTMX library to read Tiled Map Editor's TMX maps.

Notifications You must be signed in to change notification settings

z9484/PyTMX

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Map loader for TMX Files

Python 3 fork of PyTMX 
by Z9484


########################
Original Author

bitcraft (leif dot theden at gmail.com)
v.15 - for python 2.6 and 2.7

released under the LGPL v3


===============================================================================

This map loader can be used to load maps created in the Tiled map editor.  It
provides a simple way to get tiles and associated metadata so that you can draw
a map onto the screen.

This is *not* a rendering engine.  It will load the data that is necessary to
render a map onto the screen.  All tiles will be loaded into in memory and
available to blit onto the screen.


Design Goals:
    Simple api
    Memory efficient and fast

Features:
    Loads data and "properties" metadata from Tile's TMX format
    "Properties" for: maps, tilesets, layers, objectgroups, objects, and tiles
    Point data for polygon and polyline objects
    Automatic flipping and rotation of tiles
    Supports base64, csv, gzip, zlib and uncompressed XML
    Image loading with pygame

Why use PyTMX?

    PyTMX is efficient:
        Only the tiles used on a map are loaded into memory
        Map information is stored as integers (8-16 bit), not python data (32+kb)
        Extensive use of generators and iterators make it easy on memory

    PyTMX is flexible:
        Supports all major Tiled features and object types
        PyTMX data classes can be subclassed and extended
        Has built-in pygame tile loading
    Does not force you to render data in any particular way

    PyTMX is supported:
        GitHub hosting allows for community participation
        I have kept PyTMX current with new versions of Tiled since v.7

    PyTMX is usable:
        Liberal LGPL license means you can use PyTMX any way you want

More information can be found in the source files.


===============================================================================

Please see tmxloader.py's docstring for version information and sample usage.
Check tests/test.py and tests/demo.py for examples on how to use the library.


===============================================================================

The 16x16 overworld tiles were created by MrBeast at opengameart.org. CC-BY 3.0

About

Python 3 Port of PtTMX library to read Tiled Map Editor's TMX maps.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%