#reader #tiled #tmx #tileset #properties #terrain #map

tmx_reader

A rough implementation of a reader for TMX (Tiled) files

1 unstable release

0.1.0 Dec 8, 2019

#6 in #tmx

EPL-2.0 license

25KB
626 lines

TMX Reader

This library provides a reader for TMX files.

These files can be created using the great Tiled editor.

What is supported

  • Tilesets
  • Objectgroups
  • Properties

What is missing

  • Layers
  • imagelayer
  • Grid (and all other isometric stuff)
  • embedded data
  • terrain
  • animation
  • wangsets
  • ...

So there is still a ton of thiungs to do.

Usage

use tmx_reader::Map;
use std::path::PathBuf;
use std::fs;

let mut d = PathBuf::from(env!("sandbox.tmx"));

let contents = fs::read_to_string(d.as_os_str())
    .expect("Something went wrong reading the file");

let map = Map::new(contents.as_str());

#Demo and WASM A full demo, which also works inside the browser using WASM is located HERE.

Aim

I have no idea if this will ever be a useful crate :)

I just use this for my own little game experiments.

Dependencies

~4.5MB
~141K SLoC