bevy_map_runtime
Runtime map loading and rendering for Bevy 0.17 using bevy_ecs_tilemap.
Part of bevy_map_editor.
Features
- Efficient tilemap rendering via bevy_ecs_tilemap 0.17
- Asset-based map loading with hot reload support
- Custom entity spawning with
#[derive(MapEntity)] - Autoloading for animations and dialogues
- Collision integration with Avian2D physics (optional
physicsfeature) - Runtime tile modification
Quick Start
use *;
use *;
Custom Entities
Register entity types to spawn game objects from map data:
use *;
use *;
// Register in your app builder
new
.add_plugins
.
// ... other setup
Auto-Loading Animations
Use AnimatedSpriteHandle to autoload sprite animations from a map project:
use *;
use *;
use AnimatedSpriteHandle;
Autoloading Dialogues
Use DialogueTreeHandle to auto-load dialogues:
use *;
use *;
use DialogueTreeHandle;
Manual Animation Control
For direct control over sprites, use #[map_sprite]:
Collision Integration (Avian2D)
Enable the physics feature to automatically spawn colliders from tile collision data:
= { = "0.1", = ["physics"] }
use *;
use *;
use MapCollisionPlugin;
use *;
The MapCollisionPlugin reads collision shapes defined in the tileset editor and spawns corresponding Avian2D Collider components. Query MapCollider to access original collision data.
Re-exported Types
For convenience, use bevy_map::prelude::* which includes all commonly used types:
use *;
// Includes: MapRuntimePlugin, MapHandle, MapEntity, AnimatedSprite,
// DialogueRunner, DialogueTree, and more
License
MIT OR Apache-2.0