Skip to content

miltoncandelero/tiled-typedefs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Tiled Typedefs

This is a LOGIC-ONLY implementation of the json export of Tiled

(More info about the json export here)

The bad news is that this won't render anything.

The good news is that this should work with any engine you can think of: OpenFL, Kha, Heaps, Flixel, Haxegon, Punk, etc.

Installation

To install a release build:

haxelib install TiledTypedefs

Usage

//first get your json string somehow loaded into your game.
//Here I show OpenFL's Way
var jsonMap:String = Assets.getText("assets/map.json");

//Then just parse into the object.
var map:Map = Json.parse(jsonMap);

//Tadaaa, enjoy your autocomplete and type safety.
for (layer in map.layers) {
    trace (layer.name);
    trace (layer.type);
}

Made with ♥ by Milton Candelero - Oct 2019

About

Typedefs for parsing json tilemaps made with Tiled

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages