Skip to content
Hyomoto edited this page Feb 20, 2023 · 3 revisions

Welcome to the LDtk-GM wiki! Check out the sidebar for references to all of LDtk-GM's structures.

A simple program

Having issues? Feel overwhelmed? Here's the minimum code needed to get your LDtk level into Gamemaker! Pop this code into the create event of an object in your room and watch the magic!

loader = new LDtkLoader();
loader.open( "yourfile.ldtk" );
loader.create( "Level_0" );

A more advanced program

The last program assumes all of your LDtk assets have the same name as your GM assets. But what if that isn't the case? We can also provide some mappings. You can provide as many mappings as you need:

loader = new LDtkLoader();
loader.open( "yourfile.ldtk",
  { "Tileset" : tsYourTileset },
  { "Entity" : objYourObject }
);
loader.create( "Level_0" );
Clone this wiki locally