For example, when using TMX for client development, the server only needs to obtain map terrain data, that is, output a length, width, and whether the points are walkable, and output them to a binary file. How to customize an export option?I am a newcomer, and I saw a similar question mentioned by someone before saying that Python can be used for implementation? Can you provide more detailed steps? What is the JavaScript script written below this address for?
You can extend Tiled with JavaScript, including the ability to add custom export formats. This is documented here:
- Scripting — Tiled 1.10.2 documentation
- Use
tiled.registerMapFormat
to register custom map formats. - See also
BinaryFile
for writing binary files (the content of which is constructed with standard JSArrayBuffer
API.