| Crates.io | bevy_map |
| lib.rs | bevy_map |
| version | 0.3.1 |
| created_at | 2025-12-22 10:36:03.873238+00 |
| updated_at | 2026-01-20 11:19:04.061312+00 |
| description | Complete 2D tilemap editor and runtime for Bevy games |
| homepage | |
| repository | https://github.com/jbuehler23/bevy_map_editor |
| max_upload_size | |
| id | 1999498 |
| size | 164,740 |
Complete 2D tilemap editor and runtime for Bevy games.
Part of bevy_map_editor.
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")));
}
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"] }
| 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 |
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();
}
MIT OR Apache-2.0