TiledTypedefs

A logic-only typedef parser of tiled json maps
https://github.com/miltoncandelero/tiled-typedefs

To install, run:

haxelib install TiledTypedefs 1.1.3 

See using Haxelib in Haxelib documentation for more information.

README.md

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

Contributors
miltoncandelero
Version
1.1.3
Published
7 years ago
License
Public

All libraries are free

Every month, more than a thousand developers use Haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on GitHub!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on GitHub

⌂