module Scar::Tiled

Overview

This module contains definitions for Tiled's JSON map format.

Refer to the Tiled documentation for more explaination Last updated for Tiled v1.7.2

Example usage:

map = Scar::Tiled::Map.from_json(File.read("map.json"))
puts map.layers[0].data

It is recommended to use this in conjunction with Scar::Assets

Defined in:

scar/tiled_map.cr

Class Method Summary

Class Method Detail

def self.parse_tiledata(raw : Array(Int32) | String, tile_count : Int32, compression : Compression = Compression::None) : Array(Int32) #

Parse the data field of TileLayers or Chunks to an Array of tile ids


[View source]