Ability to read properties from Tiled maps objects straight into Bevy Engine.
cargo add bevy_tiled_blueprints --git "https://github.com/Leinnan/bevy_tiled_blueprints"
Tiled | Bevy |
---|---|
Object | Entity |
object.name | Name component |
Custom property | Component |
Custom property name | Component struct name |
Custom property value | Component serialized in ron format |
Supported custom property values:
- empty for unit-like structs without any fields
- int/bool/float for tuple structs with one unnamed fields
- ron strings for regular structs
- string properties for enum components
- string properties with names with prefixes
remove:
likeremove:{NameOfComponent}
for removing components.
Custom properties added to the layer or the map itself would be added in the same way to the corresponding entities.
Debug rendering of Objects placement can be enabled by adding TiledBlueprintsDebugDisplayPlugin
plugin to the application.
There is example in examples/simple.rs
.
- parse different object shapes, for now it just takes
x
andy
pos and turns that intoTranform
components - make example with support for collisions from
bevy_rapier
for example - create workflow for using Custom enums and classes from Tiled. Best case scenario- with provided relative path to Tiled project file on game build bevy feeds data about custom properties to project file. It would also require improvements in tiled crate
- support for object and file property values.
Big thanks to the authors of bevy_ecs_tilemap, this whole thing is based on expanding the tiled example from there. Same thanks to the authors of Blender_bevy_components_workflow.
Web example has issues with rendering but if you look into console you can see it works.
Got some idea, feedback, question or found any bug? Feel free to open an issue at any time!
bevy_ehttp
is dual-licensed under MIT and Apache 2.0 at your option.