I was creating a 2d top-down game in stride but relized while using the editor that it would take a long time to make an extensive world. So could I.. for example use Tiled to build a enviorment then import that into stride? Really I just need anything to make world building easier because I already have made a world in Tiled but don't want to start over.(But I will if I must)
1 Answer
Yes, you can use a tilemap in Stride3d.
The export file types of Tiled are TMX
and TSX
. They are Tiled’s own formats for storing tile maps and tilesets, based on XML. XML is a general-purpose markup language that you can easily parse. Stride3d uses C# as the scripting language. C# has many ready-made libraries for parsing XML. You can use them to directly parse XML format files to get the desired data. For specific file formats of TMX
and TSX
, please refer to tmx-map-format.
On the other hand, there are some existing libraries that further encapsulate the tiled file parsing process, which can directly parse TMX
and TSX
files and provide some practical interfaces to get data, such as TiledCS.
You can get the data in the tiled file in the above way, but they have not been imported into the game project yet. Tiled data is just a complex data set of "coordinates (x, y) with id n tile". You need to convert this data into objects in the game scene.