Giter Club home page Giter Club logo

godot-ldtk-import's Introduction

godot-LDtk-import

  • Godot version: 3.2.3
  • LDtk version: 0.6.2

Basic GDscript for importing LDtk files into the Godot game engine.

Updates:

1/4/2021:

  • Updated for new version of LDtk.
  • Changed import style: instead of making a new scene you can just open the ldtk file.

11/24/2020:

  • removed import files.

11/22/2020:

  • The Importer is now an addon/plugin.
  • Added basic import options for Entities.

11/13/2020:

  • Added basic functionality for autolayers and intgrid layers.

Can now create tilemaps from autolayers and intgrid layers with tilesets. Intgrid layers without tilesets are ignored currently.

11/12/2020:

  • Currently this script has very basic functionality. Only Tile Layers are currently working.

How to use:

  1. Copy the addons folder to your godot project folder.
  2. Enable LDtk Importer under Project Settings/Plugins.
  3. Add a .ldtk map file and any spritesheets you're using to your project folder.

Tips:

  • IntGrid, Tiles, and AutoLayers are imported as TileMap Nodes.
  • Currently Entities have very basic functionality, checkout the testmap.ldtk for examples.

Entities:

You can set up how your entities are imported:

  1. Create a new Entity
  2. Add a String Field Type
  3. Set the Field Identifier to: NodeType
  4. Set the Default Value to the type of Node

Current node options are:

  • Position2D
  • Area2D
  • KinematicBody2D
  • RigidBody2D
  • StaticBody2D

Notes:

  • The example is using the tileset that comes with LDtk: Cavernas_by_Adam_Saltsman.png
  • The conversion functions: coordId_to_gridCoords(), tileId_to_gridCoords(), tileId_to_pxCoords() are from the LDtk documentation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.