MCPcopy Index your code
hub / github.com/443eb9/bevy_entitiles

github.com/443eb9/bevy_entitiles @0.12.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.12.0 ↗ · + Follow
870 symbols 1,758 edges 109 files 65 documented · 7%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Bevy EntiTiles 🗺️

A 2d tilemap library for bevy. With many useful algorithms/tools built in.

It's NOT recommended to use the code in the dev branch! There's full of incomplete code and even errors in it! But the master branch would be ok if you can't wait to try out new features.

Currently, documentation is not very comprehensive. If you encounter any problems, please feel free to open an issue or simply ping me or DM @443eb9 on the bevy discord server.

This crate is largely inspired from bevy_ecs_tilemap(Rendering) and bevy_ecs_ldtk(LDtk entity spawning)

Why EntiTiles

  • Up-to-date Once the new version of bevy is released, bevy_entitiles will catch up mostly in 12 hours.
  • Performant Able to render 1000x1000 tilemaps at 200+fps on 10600KF + 3070.
  • Various Built-in Stuff Useful algorithms(pathfinding, WFC...) and tools(LDtk and Tiled importer...) are built in.

Warning!

You should NEVER install the following versions! They contain critical bugs and are not recommended to use!

0.6.0

Limitations

  • Supports up to 4 rendered layers* per tilemap.

* Rendered layer means the layer that will be rendered. You can insert as many layers as you want, but only the 4 top layers will be rendered.

Future Goals

The higher the priority, the more towards the front in the following list.

  • More Tilemap Shapes (Triangle, Voronoi)
  • Pathfinding (Parallel A* Pathfinding, Jump Point Search)
  • LDtk Support (Automatically map EntityRef to real entities)
  • Tiled Support (Algorithm stuff, auto map object type to real entities)
  • Tilemap Serializing (Custom Binary Format)
  • Wang Tiling
  • Tilemap Mask
  • ~~Frustum Culling~~
  • ~~Physics~~
  • ~~Infinite Tilemap~~
  • ~~Chunk Unloading~~
  • ~~Custom Material~~

Looking for render features that have been removed? They're moved into bevy_incandescent (a 2d lighting crate currently wip)!

Feature Flags

Flag Funtionality
algorithm Implementation of algorithms
atlas Use calculated uv coordinates on a entire texture instead of using texture arrays.
debug Show some debug info including aabbs for chunks and tilemaps, path finding results etc.
ldtk LDtk support.
multi-threaded Support algorithms to run asynchronously. Disable this if you are targeting wasm.
physics Physics support using avian.
serializing Save and load the tilemap from files. Also contains tools for upgrading files.
tiled Tiled support.

Coordinate Systems

The x and y axes in the tilemaps are the index axes. And those x and y on a single tile mean the actual mesh size. Which you can control using tile_render_size.

<img src="https://raw.githubusercontent.com/443eb9/bevy_entitiles/master/docs/imgs/coordinate_systems.jpg" width="500px">

legs here are mathematically incorrect, please consider it as a new concept.

Showcases

See the README in examples

Assets

Versions

LDtk version is the version that json api has changed. So you can also use 1.5.2 in 0.2.7. See this for more information.

It doesn't mean all the features from the corresponding versions of LDtk and Tiled are supported, but this crate is using the source tilemap file generated from them!

Bevy ver EntiTiles ver LDtk ver Tiled ver WASM Support
0.14.x 0.12.0 (Haven't Released) 1.5.3 1.11.0 Yes
0.14.x 0.10.0-0.11.0 1.5.3 1.11.0 No
0.13.x 0.6.0-0.9.0 1.5.3 1.10.2 No
0.12.x 0.4.0-0.5.0 1.5.3 1.10.2 No
0.12.x 0.3.0 1.5.3 Not supported No
0.12.x 0.2.7 1.5.1 Not supported No
0.12.x 0.2.3-0.2.6 1.4.1 Not supported No
0.12.x 0.2.0-0.2.2 Not supported Not supported No
0.11.x 0.1.x Not supported Not supported No

Versions before 0.3.0 are not named following Semantic Versioning

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 357
Class 254
Function 192
Enum 42
Interface 25

Languages

Rust100%

Modules by API surface

src/tilemap/map.rs68 symbols
src/algorithm/wfc.rs37 symbols
src/ldtk/resources.rs31 symbols
src/algorithm/pathfinding.rs30 symbols
src/tilemap/physics/mod.rs28 symbols
src/tiled/xml/layer.rs28 symbols
src/tiled/resources.rs28 symbols
src/math/ext.rs28 symbols
src/tilemap/tile.rs25 symbols
src/tilemap/chunking/storage.rs23 symbols
src/render/chunk.rs21 symbols
examples/ldtk.rs18 symbols

For agents

$ claude mcp add bevy_entitiles \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page