7 unstable releases (3 breaking)
| 0.5.0 | Feb 3, 2026 |
|---|---|
| 0.3.1 | Jan 20, 2026 |
| 0.2.0 | Jan 16, 2026 |
| 0.1.6 | Dec 31, 2025 |
#2325 in Game dev
145 downloads per month
390KB
6.5K
SLoC
bevy_map
Complete 2D tilemap editor and runtime for Bevy games.
Part of bevy_map_editor.
Quick Start
Add to your Cargo.toml:
[dependencies]
bevy_map = "0.1"
Load and display a map:
use bevy::prelude::*;
use bevy_map::prelude::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(MapRuntimePlugin)
.add_systems(Startup, load_map)
.run();
}
fn load_map(mut commands: Commands, asset_server: Res<AssetServer>) {
commands.spawn(Camera2d);
commands.spawn(MapHandle(asset_server.load("maps/level.map.json")));
}
Features
runtime(default) - Map loading and bevy_ecs_tilemap renderingphysics- Avian2D collision integrationhot-reload(default) - File watching for development
# With physics support
bevy_map = { version = "0.1", features = ["physics"] }
Modules
| Module | Description |
|---|---|
prelude |
Common imports for most use cases |
core |
Data types (Level, Layer, Tileset) |
runtime |
Runtime loading and rendering |
animation |
Sprite sheet animations |
dialogue |
Branching dialogue trees |
autotile |
Wang tile terrain system |
Custom Entities
Define game entities that spawn from map data:
use bevy::prelude::*;
use bevy_map::prelude::*;
#[derive(Component, MapEntity)]
#[map_entity(type_name = "NPC")]
pub struct Npc {
#[map_prop]
pub name: String,
#[map_prop(default = 100)]
pub health: i32,
}
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(MapRuntimePlugin)
.register_map_entity::<Npc>()
.run();
}
License
MIT OR Apache-2.0
Dependencies
~21–62MB
~1M SLoC