Loading LDtk files

LDtk JSON files can be easily loaded in most common languages and frameworks. If your favorite one isn’t listed below, don’t worry, we’ve got your back.

C#

  • LDtk Unity by Cammin
    A Unity package for importing/deserializing LDtk json data into C# structs, but also includes some features to generate Unity tilemaps with identical art and defined collisions, and also instantiates entities with proper field data filled in.
  • Monogame by IrishBruse
    A C# Monogame renderer.
  • QuickType loader generated by QuickType
    Load and parse LDtk files, with full types definitions. Automatically generated from Json Schema using QuickType.

Haxe

Go

  • LdtkGo by SolarLune
    An LDtk loader I made in Golang. Has a renderer pre-made for use with ebiten.
  • QuickType loader generated by QuickType
    Load and parse LDtk files, with full types definitions. Automatically generated from Json Schema using QuickType.

Python

  • QuickType loader generated by QuickType
    Load and parse LDtk files, with full types definitions. Automatically generated from Json Schema using QuickType.

Rust

  • Ldtk-Rust by Estivate
    Loads LDtk file into a typed Rust struct, should work with any Rust game framework, include example in Bevy Engine.
  • Ldtk-Rs by Katharos Technology
    Loads LDtk file into a typed Rust struct, should work with any Rust game framework, include example in Bevy Engine.
  • Ldtk-bevy by Katharos Technology
    A Bevy plugin for loading LDtk tile maps.
  • QuickType loader generated by QuickType
    Load and parse LDtk files, with full types definitions. Automatically generated from Json Schema using QuickType.

C++

  • C++ Loader by Madour
    Use it to load LDtk levels in your game and access any data you need via the API.
  • Godot by lrgilbert
    Basic GDscript for importing LDtk files into the Godot game engine.
  • Godot by JoshLee0915
    An import plugin that allows Godot to treat .ldtk files like native resources and uses them to create Godot scenes.

C

  • cLDtk by PompPenguin
    C99 loader for the LDtk map editor.

Kotlin

  • Kotlin by LeHaine
    Kotlin API with compile time code generation with a planned separate LibGDX module for rendering.

Javascript

  • JS/TS by Jan Procházka
    This library provides an API without all the noise of LDtk “editor-only” values, definitions, etc., combined with many utilities to make usage easier.
  • QuickType loader generated by QuickType
    Load and parse LDtk files, with full types definitions. Automatically generated from Json Schema using QuickType.

Is your favorite framework or language missing?

Using the “super easy” method

Enable the “Export level layers as PNG” and just load simple images in your game (see how it works).

Using QuickType

QuickType can generate a full JSON parser for many languages including Ruby, Dart, Objective-C etc. It’s based on the official JSON schema, so it’s always guaranteed to work even with latest version (see how it works).

Writing your own JSON parser

LDtk Json format was specifically designed to be easy to parse and is well documented. Also, if you just want to try LDtk in your favorite framework, and it supports Tiled TMX format, you may also use the Tiled export option.

If you want your work to be listed here, please use this GitHub issue.

Don’t worry, we’ve got your back