百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
B

bevy_ecs_tiled

> 编程语言
开源

用于处理使用 Tiled 地图编辑器创建的 2D 瓦片地图的辅助工具

172 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

用于处理使用 Tiled 地图编辑器创建的 2D 瓦片地图的辅助工具

bevy_ecs_tiled

bevy_ecs_tiled is a Bevy plugin for working with 2D tilemaps created using the Tiled map editor.

It leverages the official Tiled Rust bindings for parsing and loading Tiled map files, and uses the bevy_ecs_tilemap crate for efficient rendering.

This plugin aims to provide a simple and ergonomic workflow for integrating Tiled into your Bevy 2D games, letting you focus on game design while handling the technical details of map loading, rendering, and entity management.


Features

  • Comprehensive Map Support: Load orthogonal, isometric, or hexagonal maps, with finite or infinite layers, using either external or embedded tilesets, atlases, or multiple images.
  • Rich Tiled Feature Integration: Supports animated tiles, image layers, tile objects, and Tiled worlds for multi-map projects.
  • Entity-Based Architecture: Every Tiled item (layer, tile, object, etc.) is represented as a Bevy entity, organized in a clear hierarchy: layers are children of the map entity, tiles and objects are children of their respective layers. Visibility and Transform are automatically propagated.
  • Flexible Map Lifecycle: Control how maps are spawned and despawned. Use Bevy events and observers to customize scene setup or react when a map is loaded and ready.
  • Automatic Physics Integration: Automatically spawn Rapier or Avian physics colliders for tiles and objects, with support for custom backends.
  • Custom Properties as Components: Use Tiled custom properties to automatically insert your own components on objects, tiles, or layers, enabling powerful data-driven workflows.
  • Hot-Reloading: Edit your maps in Tiled and see updates reflected live in your Bevy game, without recompiling or restarting.

Showcases

Update your Bevy components directly from Tiled editor:

Use several maps to build a huge world:


Documentation

This crate is documented in three places:

  • The bevy_ecs_tiled book with design explanations, how-to guides and migrations guides.
  • The API reference
  • The examples folders, for concrete use cases.

There is notably a FAQ that will hopefully answer most of your questions.


Getting started

Add the required dependencies to your Cargo.toml file:

toml
[dependencies]
bevy = "0.19"
bevy_ecs_tiled = "0.13"

Basic Usage

To get started, add the plugin to your app and spawn a map entity. All you need to do is spawn a TiledMap component with the map asset you want to load (e.g., your map.tmx file). Make sure this map asset, along with any required dependencies (such as images or tilesets), is present in your local assets folder (by default, ./assets/).

…

This simple example will load a map using the default settings.

Customizing Map Loading

You can customize how the map is loaded by listening to specific TiledEvent or adding various components to the map entity, such as:

  • TilemapAnchor — Controls the anchor point of the tilemap.
  • TiledMapLayerZOffset — Adjusts the Z offset between map layers.
  • TiledMapImageRepeatMargin — Control the margin for repeated images.
  • TilemapRenderSettings — Configures rendering options.
  • Transform — Sets the position, rotation, and scale of the map.
  • Visibility — Controls the visibility of the map entity.
…

More Examples

For more advanced use cases, such as loading worlds, chunking, custom properties, or integrating with physics, see the examples directory in the repository and notably the demo_platformer.

You can also refer to the API documentation for details on all available components and configuration options.


Bevy Compatibility

bevy bevy_ecs_tilemap bevy_ecs_tiled
0.19 0.19 0.13
0.18 0.18 0.11 - 0.12
0.17 0.17 0.10
0.16 0.16 0.7 - 0.9
0.15 0.15 0.5 - 0.6
0.14 0.14 0.3 - 0.4
0.13 main@e4f3cc6 branch 0.2
0.12 0.12 0.1

Assets credits

  • colored tiles: orthogonal tileset from Steve Pryde, licensed under CC0 1.0
  • drjamgo_hex_16x16: an hexagonal "pointy-top" tileset from Dr. Jango, licensed under CC0 1.0
  • simple hex flat top: an hexagonal "flat-top" tileset from All things hex, licensed under CC0 1.0
  • kenney-sketch-desert: an isometric tileset from Kenney, licensed under CC0 1.0
  • bevy_logo: an alternative Bevy logo from Steam Ed Duck, licensed under CC BY 4.0

Contributing

If you can contribute, please do!

If you would like to contribute but don't know where to start, read this section in the book.


License

This work is licensed under the MIT license.

SPDX-License-Identifier: MIT

Issues· 18 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rust

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言