0.1.0
Major 2D Update
This update includes many new and refined elements directed at 2D games!
TileMap
New TileMap and TileSet importers are available for the open source Tiled app's JSON formats.
Completely overhauled TileMap, TileSet, and TileMapComponent. TileMap and TileSet are now resources and can be loaded like a Texture or Geometry:
let tileSet = TileSet(path: "TileSet.tsj")
let tileMap = TileMap(path: "TileMap.tmj")
// Convenince init for TileMapComponent
let entity = Entity(components: [
TileMapComponent(
tileSetPath: "Resources/TileSet.tsj",
tileMapPath: "Resources/TileMap.tmj"
),
])
You can now modify tiles in a TileMapComponent in real time:
let tileMapCoordinate = TileMap.Layer.Coordinate(column: 10, row: 15)
let newTile = TileMap.Tile(id: tileSetTileID, options: [])
entity[TileMapComponent.self].layers[0].setTile(tile, at: tileMapCoordinate)