{"repo":"mapeditor/rs-tiled","free":true,"listed":false,"github":"https://github.com/mapeditor/rs-tiled","clone":"git clone https://github.com/mapeditor/rs-tiled.git","description":"Reads files from the Tiled editor into Rust","language":"Rust","stars":294,"topics":["rust","gamedev","tiled"],"license":"MIT","category":"game-templates","readme_excerpt":"rs-tiled A crate for reading TMX (map) and TSX (tileset) files from the Tiled Map Editor into Rust. It provides a huge set of features as well as a strong wrapper over internal features such as GIDs. Documentation is available on docs.rs. Code contributions are welcome as are bug reports, documentation, suggestions and criticism. The minimum supported TMX version is 0.13. Example FAQ How do I embed a map into my executable? / How do I read a file from anywhere else that isn't the filesystem's OS? The crate does all of its reading through the read from function of the ResourceReader that you create the loader with. By default, this reader is set to FilesystemResourceReader and all files are read through the OS's filesystem. You can however change this. Here's an example mostly taken from Loader::with reader 's documentation: If the closure approach confuses you or you need more flexibility, you can always implement ResourceReader on your own structure. How do I get the crate to work on WASM targets? The crate supports WASM, but since it does not currently support asynchronous loading, there are some gotchas. - First, to make it work on any WASM target, enable the wasm feature , like so: - Second, since you cannot use the filesystem as normally on the web, you cannot use FilesystemResourceReader . As such, you'll need to implement your own ResourceReader . This is a pretty simple task, as you just need to return anything that is Read able when given a path, e.g.: You can also u","default_branch":null,"files":null,"tree":[],"storefront":"/r/mapeditor","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mapeditor/rs-tiled/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}