StarArawn / bevy_tiled

A plugin for rendering tiled maps.
MIT License
151 stars 40 forks source link

Support creating tiled maps from code. #4

Open StarArawn opened 4 years ago

StarArawn commented 4 years ago

Currently the only way to create a map is from a TMX(tiled map editor) file. We really should allow users to create maps via code.

Lamakaio commented 4 years ago

I made a simple crate to create basic tiled::Map structs from code : https://github.com/Imakoala/tiled_builder. It's not really tested and I'm not very happy with the API, but I wanted to post it here to discuss it before going further.

The generation is also a bit awkward due to the specificities of the .tmx format reflected on the tiled::Map struct which bevy_tiled doesn't really use, so I might target bevy_tiled::Map at some point.

For the moment I will see how it can be integrated into bevy_tiled.

Edit : this was heavily edited because I previously misunderstood how assets work.