#tiled #bevy #parse #tmx #parser

bevy_tiled_loader

Asset loader for the Tiled data parsed

2 releases

new 0.1.1 Jan 31, 2025
0.1.0 Jan 31, 2025

#536 in Game dev

26 downloads per month

GPL-3.0 license

605KB
1K SLoC

Tiled utilities and an AssetLoader for the Bevy game engine.

[!CAUTION] There are still quite a few bugs, missing / un-intuitive functionality, missing docs, etc. Usage, feedback, and contribution will help to improve support.


Features

  • Parse Group, Tile, and Object layers, Tile and object properties.
  • Loads the scene into Bevy.
  • Generate Tiled Colliders as bevy_rapier2d or avian2d Colliders.

Documentation

Bevy Usage Example

Add bevy_tiled_loader to Cargo.toml:

# For 2D applications:
[dependencies]
bevy_tiled_loader = {version = "*", features = "avian2d_colliders"} # You should explicitly set the version.

Add the plugin and load a *.tmx:

app.add_plugins(
  TiledScenePlugin
)

// ...

fn spawn_tiled_scene(mut commands: Commands, asset_server: Res<AssetServer>) {
  let tiled_map_handle: Handle<TiledMapAsset> = asset_server.load("my_first_tiled_map.tmx");

  commands.spawn(
    BufferedMapScene(tiled_map_handle)
  );
}

Supported Bevy Versions

Bevy My Tiled Loader
0.15 0.1

Future Features

  • Settings to control how the *.tmx is parsed and how / what gets generated.

Contributing

If you encounter any problems, feel free to open issues or create pull requests.

Acknowledgements

Bevy is awesome.

Dependencies

~24–66MB
~1M SLoC