A complete 2D tilemap editing ecosystem for Bevy 0.18. Create maps in the editor, load them at runtime with one line of code. For more complex asset loading, you can specify when to load those as well for more control.
- Visual Map Editor - egui-based editor with layer system, terrain painting, and entity placement
- Project Management - Recent projects, preferences persistence, auto-open last project
- Autotiling - Corner, Edge, and Mixed terrain modes using Wang tiles, currently WIP
- Runtime Loading - Efficient tilemap rendering via bevy_ecs_tilemap 0.18
- Custom Entities - Define game objects with
#[derive(MapEntity)]proc macro - Sprite Animations - Define sprite sheets with named animations, autoloaded at runtime
- Dialogue Trees - Visual node-based dialogue editor with branching conversations
- Schema System - Type-safe entity properties with validation
- Collision Shapes - Create and modify collision shapes on tiles, and integrate with avian2d automatically
Launch your game directly from the editor and see changes in real-time:
- Run Game button builds and launches your game project
- Live editing - continue editing while the game runs
- Auto-sync on save - press Ctrl+S to sync changes to the running game
- Hot-reload - game automatically reloads the map via Bevy's asset watcher
Game Settings Dialog - Configure your game project path and starting level:
Flip tiles while painting for more variety:
- X key - Toggle horizontal flip
- Y key - Toggle vertical flip
- Flip state shown in toolbar
- Tiled-compatible flip flags in exported maps
Save and reuse tile patterns:
- Ctrl+Shift+S - Create stamp from current selection
- Stamps preserve tile arrangement and flip states
- Quick access from Stamp Library panel
Autotile terrain transitions using Wang tiles (Corner, Edge, Mixed modes). This is heavily inspired by and credit to @bjorn for helping me with the Tiled autotiling algorithm!
Autotiling is still a WIP while I get the algorithm right, but you can manually paint Tiles in the map currently.
The below video shows switching between corner/edge based autotiling and holding ctrl for full-tile autotiling
Place custom entities with property editing in the inspector panel. As well as define custom Data Types for those entities.
Demo of how easy it is to place/create Custom entities:
Visual node-based dialogue tree editor with Text, Choice, Condition, and Action nodes. See example
Define sprite sheets with multiple named animations per asset. See example. Load these spritesheets into animations, and use the Animation Editor for animation timelines/dopesheets!
Animation Timeline with Trigger/Window events:

Add Rectangle, Circle, and custom Polygon collision shapes to individual Tiles in the Tileset. You can then show these in the tilemap with the "Show Collisions" view
Generate Rust code directly from your map data to accelerate game development.
Features:
- Entity Structs - Auto-generate Bevy components from entity type definitions
- Enum Definitions - Generate Rust enums from schema enum types
- Behavior Stubs - Create placeholder functions for entity behaviors
- Movement Systems - Generate input-driven movement code from Input profiles
Configure code generation in Game Settings, preview before writing, and open generated files directly in VS Code.
| Crate | Description |
|---|---|
| bevy_map | Main crate - re-exports all runtime functionality |
| bevy_map_editor | Visual map editor with egui UI |
| bevy_map_core | Core data types (Level, Layer, Tileset, MapProject) |
| bevy_map_runtime | Runtime rendering via bevy_ecs_tilemap |
| bevy_map_autotile | Wang tile autotiling system - WIP |
| bevy_map_animation | Sprite sheet animations |
| bevy_map_dialogue | Dialogue tree system |
| bevy_map_derive | #[derive(MapEntity)] proc macro |
| bevy_map_schema | Entity property validation |
| bevy_map_codegen | Rust code generation from map data |
# From crates.io
cargo install bevy_map_editor
# Run the editor
bevy_map_editoruse bevy::prelude::*;
use bevy_map_editor::EditorPlugin;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(EditorPlugin)
.run();
}Or run the example:
cargo run --example basic_editor -p bevy_map_editor_examplesAdd bevy_map to your Cargo.toml:
[dependencies]
bevy = "0.18"
bevy_map = "0.1"
# With physics (Avian2D collisions)
# bevy_map = { version = "0.1", features = ["physics"] }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);
// Load and spawn the map
commands.spawn(MapHandle(asset_server.load("maps/level1.map.json")));
}Define game entities in code, place them in the editor:
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();
}| Example | Description |
|---|---|
custom_editor |
Embed editor with custom configuration |
runtime_loader |
Load and display a map |
collision_demo |
Physics integration with Avian2D collisions and animations - START HERE |
animation_auto_demo |
Auto-loading animated sprites |
animation_manual_demo |
Manual sprite animation control |
animation_triggers_demo |
Animation triggers and windows |
dialogue_auto_demo |
Auto-loading dialogue trees |
dialogue_manual_demo |
Manual dialogue handling |
custom_entities_demo |
Custom entity types from map data |
tileset_demo |
Tileset rendering and tile properties |
Run examples:
cargo run --example custom_editor -p bevy_map_editor_examples
cargo run --example collision_demo -p bevy_map_editor_examplesMaps are saved as .map.json files see example full-project JSON:
{
"version": 1,
"schema": {
"project": { "name": "My Game", "tile_size": 16 },
"data_types": {
"NPC": {
"color": "#4CAF50",
"placeable": true,
"properties": [
{ "name": "name", "type": "string", "required": true },
{ "name": "health", "type": "int", "default": 100 }
]
}
}
},
"tilesets": [],
"levels": [],
"sprite_sheets": [],
"dialogues": []
}| Shortcut | Action |
|---|---|
Ctrl+N |
New Project |
Ctrl+O |
Open Project |
Ctrl+S |
Save (+ sync if game running) |
Ctrl+Shift+S |
Create Stamp from Selection |
Ctrl+Z |
Undo |
Ctrl+Y |
Redo |
Ctrl+C/V/X |
Copy/Paste/Cut |
G |
Toggle Grid |
X |
Toggle Horizontal Flip |
Y |
Toggle Vertical Flip |
W |
Toggle World View |
L |
Switch to Level View |
| Dependency | Version |
|---|---|
| Bevy | 0.18 |
| bevy_ecs_tilemap | 0.18 |
| bevy_egui | 0.39 |
| Rust | 1.76+ |
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
Contributions welcome! Please open an issue or submit a pull request.











