https://github.com/miltoncandelero/tiled-typedefs
Typedefs for parsing json tilemaps made with Tiled
https://github.com/miltoncandelero/tiled-typedefs
Last synced: 2 months ago
JSON representation
Typedefs for parsing json tilemaps made with Tiled
- Host: GitHub
- URL: https://github.com/miltoncandelero/tiled-typedefs
- Owner: miltoncandelero
- Created: 2019-10-28T22:40:54.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-31T14:31:02.000Z (over 5 years ago)
- Last Synced: 2025-01-19T07:14:07.841Z (4 months ago)
- Language: Haxe
- Size: 22.5 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tiled Typedefs
This is a **LOGIC-ONLY** implementation of the json export of [Tiled](https://www.mapeditor.org/)
(More info about the json export [here](http://doc.mapeditor.org/en/latest/reference/json-map-format/))
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
```haxe
//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_