| Crates.io | bevy_sparse_tilemap |
| lib.rs | bevy_sparse_tilemap |
| version | 0.4.0 |
| created_at | 2023-08-12 05:21:39.144191+00 |
| updated_at | 2024-12-10 21:02:56.901712+00 |
| description | A Tilemap crate for the Bevy game engine with a focus on large map sizes and ECS sparse maps |
| homepage | https://github.com/NoahShomette/bevy_sparse_tilemap |
| repository | https://github.com/NoahShomette/bevy_sparse_tilemap |
| max_upload_size | |
| id | 942574 |
| size | 253,484 |
bevy_sparse_tilemapA Tilemap crate for the Bevy game engine with a focus on large map sizes and ECS sparse maps
ECS Sparse Tilemaps
bevy_sparse_tilemaponly spawns the minimum amount of entities neccesary and doesn't one-to-one map tiles to entities. This allows it to dodge current Bevy performance issues related to rendering and unlocks a substantially higher baseline performance for extra large maps.Tiles in
bevy_sparse_tilemapare stored on each chunk using custom storage.bevy_sparse_tilemapdoes support spawning entities mapped to specific tiles at will for when you really need to save extra information or to gain access to the ECS when needed for specific tile types.
bevy_sparse_tilemaphas a built in API to handle spawning, despawning, and accessing tiles optional entities as well as tile data.Internally this crate supports both Sparse and Dense internal storage. Both are still ECS sparse (minimal amount of entities spawned) but sparse maps don't require the user to supply data for every tile.
Multiple Map Types
bevy_sparse_tilemapsupports different map types using a generics trait based system that provides great flexibility to support many different map types.Currently supported:
- Hexagon
- Square
Massive Map SizesBecause of the ECS Sparse nature of the crate,
bevy_sparse_tilemapdodges current limitations in Bevy related to rendering performance issues. These limitations are what other tilemap crates run into and inhibits their performance. This allowsbevy_sparse_tilemapto have exceptional performance as a baseline, allowing maps as large as 15k x 15k easily with smart rendering using something like bevy_fast_tilemap.
Tilemap Logic OnlyThis crate focuses purely on the tilemap logic and leaves the rendering to the user.
See Docs.rs for documentation on how to use bevy_sparse_tilemap as well as brief examples.
See GitHub examples for longer examples of each feature of the crate.
bevy_ecs_tilemap?bevy_ecs_tilemap is a fabulous crate that will probably cover most of your needs in an easier to use plugin and you
should reach for that first in most situations.
You should use bevy_ecs_tilemap if:
bevy_ecs_tilemap runs into performance issues around 200x200 in my testing)You should use bevy_sparse_tilemap if:
bevy_sparse_tilemap can reach substantially larger map sizes compared to bevy_ecs_tilemap.| BST Version | Bevy Version |
|---|---|
| 0.4 | 0.15 |
| 0.3 | 0.14 |
| 0.2 | 0.13 |
| 0.1 | 0.13 |