A Swift Package for reading Tiled levels that makes it easy to specialize the loaded level/sheets etc for a specifc game engine.
To simply load a map and any associated tilesets it is as simple as
import TiledKit let map = Project.default.retreive(map: "Test Map") print ("Hello, \(map.name)!")
The primary use of TiledKit will be enable you to convert the maps you design in Tiled into playable games using a game engine, and there is significant support for doing that quickly and efficiently (as well as open source projects that already capture them such as SpriteKit). You can find documentation aimed at guiding you through that process Game Engine Specialization.
TiledKit works on all Apple & Linux platforms supporting Swift 5.3 or later.
- Worked example of specialization for your chosen platform Game Engine Specialization
- Full API documentation is available for TiledKit
TiledKit is distributed as a Swift package to be built with SPM. You can include it in your project by adding the following dependency to your
.package(url: "https://github.com/SwiftStudies/TiledKit", from: "0.6.0")
In order to support the different compression standards used in Tiled you will need zlib and zstd. zlib is availble already on Apple platforms, but you will still need zstd. In order to make these buildable follow the instructions below, these are very standard libraries and you should not have any issues.
brew install zstd
sudo apt install libz-dev sudo apt install libzstd-dev