Pytiled-parser

Latest version: v2.2.7

Safety actively analyzes 681874 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

2.2.1

Added official support for Python 3.11. No changes were actually made to do this, and most all previous versions of pytiled-parser should work fine with 3.11. We are just now including 3.11 in the matrix of Python versions we run tests for.

Improved compatibility for pre-1.0 Tiled JSON formats([65](https://github.com/pythonarcade/pytiled_parser/pull/65)). This does not necessarily mean we guarantee support with older versions of Tiled, support for older versions will be on a best effort approach.

2.2.0

Added support for the following features from Tiled which were added in either Tiled 1.8 or 1.9. If you would like some more info on some of these items, please refer to the [release notes](https://www.mapeditor.org/news) from Tiled for those versions:

- **Tilesets**

- `Tileset.tile_render_size` has been added, which reflects the `tilerendersize` attribute from Tiled. This is a string value which can be either "tile" or "grid". This is used to determine the size the tile will render at. This defaults to `tile` and is the only behavior prior to Tiled 1.9, meaning it will use the size specified by the Tile. If this is set to `grid` it will scale the tiles to the size defined the grid in the map.
- `Tileset.fill_mode` has been added, which reflects the `fillmode` attribute from Tiled. This is a string value which can be either "stretch" or "preserve-aspect-ratio". This is used to define how the scaling will be done when a tile is not rendered at it's native size(Like when using the `grid` option for `tilerendersize`).
- The `Tile` class has four new attributes: `x`, `y`, `width`, and `height`. By default, `x` and `y` will be zero, and `width` and `height` will be the same as `image_width` and `image_height`. These values are only able to changed for tiles which use an individual image rather than a single image file for the whole tileset. These values are used to define a sub-rectangle of the image which the Tile should be loaded as. These are all separate attributes rather than using the `OrderedPair` and `Size` classes as this is somewhat of a developing feature in Tiled in an effort to support sprite atlasses, and so for now we are going to just stick as closely to the underlying format as possible for it, to make future changes easier.

- **Layers**

- Added `repeat_x` and `repeat_y` attributes. These are derived from the `repeatx` and `repeaty` attributes in Tiled. These are boolean values which are used to determine if a layer should be repeated on a given axis when drawn. As of writing in Tiled these values can only be applied to Image layers, however it is possible other types will support this in the future. To prepare for this, these values are available to all layer types in pytiled_parser, and they will default to `False`.

- **Maps**

- Added `parallax_origin` attribute. This is an `OrderedPair` object which is derived from the `parallaxoriginx` and `parallaxoriginy` attributes in Tiled. This is used to define a map wide origin point that layers which have parallax scrolling will use.

2.1.2

This version does not make any changes to the library. The project has moved to using Github Actions to publishing the distribution to PyPI. We have made this release to fully test the system and ensure it is functional for future releases.

2.1.1

This version contains just one bug fix. Previously if a map or other object in the TMX format contained a [Class property](https://doc.mapeditor.org/en/stable/manual/custom-properties/#custom-types) which was added in Tiled 1.8, then pytiled-parser would crash.

Classes are not a supported feature in pytiled-parser yet, however the existence of them isn't intended to break the rest of the supported featureset. This fix makes the rest of the map still be able to be successfully parsed and used if one of these exists in it.

See [60](https://github.com/pythonarcade/pytiled_parser/pull/60) for more info on this bug. Thanks to [laqieer](https://github.com/laqieer) for this PR.

2.1.0

This is largely a compatibility update to work with the latest version of Tiled. This version represents the first version of pytiled-parser that is compatible with the formats from Tiled 1.9. Previous versions do not work with maps or tilesets of either JSON or TMX formats from Tiled 1.9 or higher, if you need to use Tiled 1.9+ with an older version of Tiled, you will need to use Tiled's ability to save the map in compatibility mode.

This update does introduce a slight API breaking change, but is unlikely to really cause any problems. The `type` attribute has been removed from the `TiledObject` class as well as the `Tile` class. It has been replaced with the `class_` attribute. This is in keeping with following Tiled's own API as closely as possible. There shouldn't really be any functional difference here, in most cases it has just been re-named. For more information on this change, you can reference the [Tiled JSON format changelog](https://doc.mapeditor.org/en/stable/reference/json-map-format/#changelog).

It is important to note, that this update does not add support for new features introduced in Tiled 1.9(and in fact, we are still missing support for some features from 1.8). This update is primarily to ensure that maps using the base feature set we have had support for will continue to work with the same supported featureset on Tiled 1.9. Support for the new features is something we would like to achieve, but we did not want to hold back general compatibility for it.

Outside of that, all other changes are to the internal parsers and do not effect usage/implementation of pytiled-parser.

2.0.1

Someone, not naming any names, forgot to put `__init__.py` files in some packages, and caused imports to break when installed via a `.whl` and not an editable source install. This just fixes that problem.

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.