All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- New
ImageLayerrepeat_x/yfields are now parsed from map image layers. (#324) - Support for Tile
x,y,widthandheightattributes related to image rects. (#277)
- Added a new crate feature
worldto enable support for parsingWorldfiles.
- Added a
sourcemember toTileset,MapandTemplate, which stores the resource path they have been loaded from. (#303) - Add
hex_side_lengthmember toMap. (#313)
- Fixed template instance size and position overrides in
ObjectData::shape. (#309)
- Improved documentation on
Map::layersandMap::get_layer. (#306) - Extend lifetime of
Layers returned fromGroupLayer::get_layerto the map's. (#307)
- Add
text,widthandheightmembers toObjectShape::Text. (#278) - Implement
ResourceReaderfor appropiate functions. (#272) Read the README's FAQ for more information about this change. - Support for custom type properties. (#283)
- Underlying reader for maps now uses a BufReader, which should give a large performance boost. (#286)
- Update
base64to0.22.1. (#294) - Update
libflateto2.1.0. (#294) - Update
zstdto0.13.1. (#294)
ObjectShape::Text::kerning's default value, which should have been set totrueinstead offalse. (#278)- Unhandled u32 parsing panic in
decode_csv. (#288) - Panic in
<Color as FromStr>::from_strwhen parsing non-ascii input. (#290) - Index out of bounds in
InfiniteTileLayerDatawhen parsing a chunk. (#289) - Panic on unexpected XML in
ObjectDatacontent. (#291) - Divide by zero when parsing a tileset with height/width dimension of 0. (#292)
- Replace
libflatewithflate2. (#281)
- Updated
Imagedocs. (#270) - Update
libflatedependency to2.0.0. (#279) - Fix some doc links. (#273)
- Update ggez example to 0.9.3.
- WASM support +
wasmfeature; CheckREADME.mdfor instructions on how to set it up. (#252) - Support for staggered maps. Maps now have an
stagger_axisandstagger_indexproperty. (#262)
- Template support!
Templates are loaded automatically when they are encountered, and are treated as intermediate
objects. As such,
ResourceCachehas now methods for both getting and inserting them (#170). - VFS support (#199).
as_xfunctions for layer types (#235).- Text object support (#230).
cache_mutloader property (#207).
LayerTypevariants have been stripped from theLayersuffix (#203).TileData::tile_typehas been renamed toTileData::user_type. (#253)Orientation'sFromStrimpl now returnsOrientationParseErroras the error type. (#253)ResourceCache::get_or_try_insert_tileset_withhas been replaced byResourceCache::insert_tileset.DefaultResourceCache's members have been made public.
ObjectData::obj_type,ObjectData::width,ObjectData::height. (#253)TileData::tile_type(which has been renamed toTileData::user_type) (#253)Loader::load_tmx_map_from,Loader::load_tsx_tileset_from: This was a hacky solution to loading embedded maps and tilesets. While there is no direct, ready-to-use replacement for this within the crate, you can create aResourceReaderthat works like this function previously did:
struct EmbeddedResourceReader<R: Read> {
reader: Option<R>,
}
impl<R: Read> EmbeddedResourceReader<R> {
fn new(reader: R) -> Self {
Self {
reader: Some(reader),
}
}
}
impl<R: Read> tiled::ResourceReader for EmbeddedResourceReader<R> {
type Resource = R;
type Error = std::io::Error;
fn read_from(&mut self, path: &Path) -> std::result::Result<Self::Resource, Self::Error> {
if path == "the_path_to_load.tmx" {
if let Some(x) = self.reader.take() {
Ok(x)
} else {
Err(std::io::Error::from(ErrorKind::ResourceBusy))
}
} else {
Err(std::io::Error::from(ErrorKind::NotFound))
}
}
}Note: This works for both maps and tilesets, and you can extend to use more than one reader if neccessary, which is something you couldn't do before.
- Support for Wang sets.
- Support for Tiled 1.9
Classproperty. Maps, tilesets and layers now have auser_typeproperty. - Support for tile offsets. Tilesets now have an
offset_xandoffset_yproperty.
Object::obj_typeUseObject::user_typeinstead.
- Update
zstdto0.12.0. - Update
sfmldev dependency to0.20.0. - Update
base64to0.21.0.
- Map-wrapped chunks:
ChunkWrapper. - Ability to access infinite tile layer chunks via
InfiniteTileLayer::chunks,InfiniteTileLayerData::chunk_data,InfiniteTileLayerData::get_chunk_data&InfiniteTileLayer::get_chunk, as well as chunk data viaChunk::get_tile_data&ChunkWrapper::get_tile. TileLayer::width&TileLayer::heightfor ergonomic access of width/height.FiniteTileLayerData::get_tile_data,InfiniteTileLayerData::get_tile_data.Defaultderived implementation forLoader&FilesystemResourceCache
- Update
zstdto0.11.0.
Loadertype for loading map and tileset files without having to necessarily mention the cache to use.
Map::parse_reader: UseLoader::parse_tmx_map_frominstead.Map::parse_file: UseLoader::load_tmx_mapinstead.Tileset::parse_reader: UseLoader::load_tsx_tilesetinstead.
- Fix message when a tileset is missing the
tilecountattribute (#194).
As this release changes practically the entire interface of the crate, it is recommended that you check out the examples instead of the changelog if you are migrating from an older version.
- Documentation to all crate items.
- Group layer support.
- Layer ID parsing.
- Object property parsing.
- Support for multiline string properties.
- SFML example.
Resulttype.Layer::parallax_x&Layer::parallax_y.Tileset::columns.- Missing derive and inline attributes.
- Tests for
zstd-compressed files.
- Set the minimum Tiled TMX version to 0.13.
- Refactor crate interface and internals to be more consistent, sound and easy to use.
- Hide GIDs as internal data; Provide a cleaner API.
- Contain all layer types in an enum as opposed to different containers.
- Rename
TiledErrortoError. Tileset::tilecountis no longer optional.- Improve errors.
- Use
Colortype in color properties. - Rename "colour"-related appareances to "color".
- Use
impl AsRef<Path>where appropiate. - Change
Tileset::imageto be a single image at most instead of a vector. - Update README.
- Make layer and tileset names optional, defaulting to an empty string.
- Reorganize crate internally.
- Update
zstdto0.9.
- Color parsing issues: #148
Layer::layer_index, as all layer types are now stored in a common container.Map::source, since it is known from where the load function was called.
- Support for file properties.
- Parsing csv data without newlines (LDtk).
- Support for layer offsets.
- Feature gate zstd to allow targeting wasm32-unknown-unknown.
- Object visibility parsing.
- Support for base64 and zstd compressed maps.
- Support for point objects.
- Support for infinite maps.
- Properties to Tilesets.
- Test verifying
tileset.properties. - Tileset tile count parsing.
- Object
widthandheightfields.
- Make fields on
Framepub.
- Migration to
rust 2018and?