Modern, lightweight and efficient 2D level editor
MIT License
Published by deepnight over 2 years ago
I know: for every new tool out there, there is this moment when you need to write the importer for your favorite game engine.
I’ve been there too, so LDtk offers a Super simple export option. You can enable it from the Project settings panel.
You will get:
intGridValue
presence in JSON for non-IntGrid layersPublished by deepnight over 2 years ago
When I started working on LDtk about 1 year ago (which was known as LEd back then), I would not have imagined how far and how big this would get. LDtk was a critical part of my personal game dev plan, because I knew I needed a modern, fast and user-friendly level editor for my future projects.
Along the way, a passionate community of level designers, aspiring game devs and tech enthousiasts gathered around the project, providing an incredible support and lots of precious feedback.
To all of you, thank you.
This 1.0 step is obviously a major milestone. It is the biggest update so far and it pushes LDtk to the next level (pun intended):
I hope you will like it, as much as I enjoyed making it :)
This new "field" type is available to all Entities and is used to store a reference to another Entity.
A typical example is a Button entity with a Reference field pointing to another Entity, like a Door.
You can create arrays of References, or define restrictions to which kind of Entity they can point at. This new powerful feature unlocks lots of new exciting possibilities in a very user-friendly interface.
LDtk now has an integrated icon tileset to make your Entities easier to read in the editor.
Please note that these icons were provided courtesy of their author, FinalBossBlues, and are to be used only in the editor environment.
If you want to use them in your game directly, you will need to license it from its author FinalBossBlue (itch.io). He's a nice person, feel free to send an e-mail to get in touch :)
Thanks to major optimizations, general performances will see a big boost, while reducing CPU usage, especially on large projects.
Loading and Saving operations were also vastly improved:
The way auto-layer rules are calculated was reworked (and a few bugs were fixed), making their rendering significantly faster, especially in large levels.
The undo/redo engine was complitely rewritten in a much more simple and optimized fashion. This results in a huge performance boost for large levels, while also fixing some existing issues when undoing a Selection move.
Entities (and levels too, actually) can use a new Custom Field type which can store a rectangle of tiles from any Tileset. This can be used as an alternative skin, an array of animation frames, an "opened" visual state for a a chest etc.
For now, this crazy futuristic feature is only available for interface panels (eg. Layer definitions, Auto-layer rules etc.) but will be soon expanded to data in levels, such as entities or large chunks of layer elements.
You can right click on an element with a context menu to copy/cut/paste/duplicate definitions! LDtk just entered modern era.
Levels can now be organized in "depth" to support stacked levels.
The main editor toolbar was reorganized to be a little bit more logical:
Level
button is now near the World
button. They also share the same color.Project
button is now brown and near the four Definition buttons.P
: project settings panelL
: layers panelE
: entities panel (replacing the previous "Select empty spaces" option)U
: enums panelT
: tilesets panel (replacing the previous "Toggle tile stacking" option)F1
to F10
keys are now associated with layers selection (replacing the previous 0-9
keys shortcuts)The Space
key now fulfills various roles:
SPACE
once to recenter view on current level or on the whole world (depends on where you are).SPACE
and drag with Left mouse button
to scroll the view.SPACE
and drag with Right mouse button
to zoom in/out.The editor UI font nows uses Noto which offers better readability. While I was at it, I also fixed various font size issues with 2K and 4K monitors.
Enums and Tilesets can now be organized using user defined tags:
Errors in entities, such as a "null" custom field while being defined as "required", are now much more visible in the level view.
Contextual help tips were also reworked and streamlined in every existing panels. You now have a single small "?" indicator that gives all useful info you need for pretty much every editor options.
LDtk executable is now properly signed on Windows, which should ultimately get rid of "This application could destroy your computer" warning.
worlds
array and World
JSON structure to the docs. This was added as a preview for the upcoming new feature "Multiple Worlds in a single project". Learn more about that here: https://github.com/deepnight/ldtk/issues/231
tileId
in Entity Definitions has been replaced by tileRect
to support multiple tiles instead of just single ones. The tileId
will still be exported for now, but will be removed completely soon.levelUid
in Neighbours arrays has been replaced by levelIid
(new string based IID). The levelUid
will still be exported for now, but will be removed completely soon.autoTilesetDefUid
into tilesetDefUid
for all Layer Definitions. This should have no impact if you properly used the __tilesetDefUid
found in Layer Instances, as recommended in the docs. The autoTilesetDefUid
will be dropped completely in a later update.__smartColor
to Entity instance JSON.intGridValues
in JSON for non-IntGrid layersYou can try multi-worlds using debug menu. Please note that this feature is highly experimental and will probably evolve a lot in upcoming updates. Don't use for production.
CTRL+SHIFT+D
),enumTags
and customTileData
typing in QuickTypes files.F12
key) and look for the Log File line.up
/down
arrow keys to quickly increment/decrement an input valueCTRL-H
) to hide everything except Tiles in layers (entities, labels, intGrids etc.)PAGEUP
/PAGEDOWN
keyboard shortcuts to zoom in/outSPACE
+ Right mouse click to zoom in/outT
shortcut to SHIFT-T
for "Tile stacking"E
shortcut to SHIFT-E
for "Select empty spaces"CTRL-SHIFT-D
)/path/to/app/LDtk myProject.ldtk
)Published by deepnight over 3 years ago
Published by deepnight over 3 years ago
Published by deepnight over 3 years ago
F12
)CTRL
to disable preview when moving mouse over auto-layer rules.Published by deepnight over 3 years ago
AutoLayers_5_OptionalRules
". How it works: simply right click on a group of rules in the Rules panel to mark it as Optional
. This group will then be disabled by default everywhere, and you'll be able to manually enable it in some specific levels only.Level_%idx
" will name levels "Level_0", "Level_1" etc, based on their order of creation (or order in array, in Horizontal/Vertical world layouts)MyLevel_%gx_%gy
, each level will be named using the world grid X/Y coordinates (only applies to GridVania world layouts).intGrid
in Layer instances
! If not done yet, please switch to the intGridCsv
value. The old value will be removed on 0.9.1 update.enumTags
in Tileset definition JSON
(see https://ldtk.io/json/)SHIFT-R
.Published by deepnight over 3 years ago
F11
to toggle this mode.Published by deepnight over 3 years ago
Note for developers: IntGrid layers JSON format changed in this update. For now, retro-compatibility is maintained with old importers, but this will be dropped after update 0.9.0, breaking outdated importers. Please read all the details here: https://github.com/deepnight/ldtk/issues/358
F12
).Ctrl+Shift+D
. It will contain some commands that could be useful if you encountered some specific bug types. Commands inside this debug menu are harmless, so you can use them without any risk (unless some in-app message says the opposite).Shift
+ left click on a visibility icon to Show or hide all other layers except the current one.W
, then open settings).F12
).Shift
or Alt
Published by deepnight over 3 years ago
F12
to open app settings from almost anywhere.ALT+SHIFT
)Published by deepnight almost 4 years ago
Published by deepnight almost 4 years ago
This update features many important changes to make LDtk production ready and future proof. These changes will allow better support for large projects, better API creation and maintenance, and smoother user adoption.
We are getting really close to 1.0!
New home layout: the app home screen has been re-organized to focus on what's really important.
Separate level files: when enabled, LDtk will save separately the project JSON and one file per level. A much needed feature to reduce JSON size and optimize parsing times! The option is in Project settings (press F1
): "Separate level files".
When enabled, all the project settings and definitions will still be stored in the *.ldtk
file, and all level data will now be saved to separate files (one per level) in a sub-folder, in *.ldtkl
files (notice the extra l
letter at the end of the extension).
Important notes: this new feature might not be supported in all current existing APIs and loaders. Also, this option isn't enabled by default, but this might change on 1.0.
Save layers as PNG: if you really don't want to bother with the LDtk JSON, you can check this new option in your project settings to export all your layers as PNG images (note: only supported layers will be exported, that is those with tiles).
Backups: automatically keep extra copies of your project in a sub-folder every time you save (enable backups in your project settings). Important: LDtk only keeps up to 10 backup files per project.
Crash backups: if, for some reasons, LDtk crashes, it will try to backup your unsaved work automatically. Obviously, this works even if the backup setting isn't enabled.
Level background image: each level can now have a custom background image (PNG, GIF or JPEG) that can be resized and aligned in various ways.
New font: replaced the often hard-to-read pixel font with a sleeker "Roboto" font (this change affects entity fields and floating level informations).
New APIs: LDtk JSON files can now be easily parsed in many languages, including C#, Python, Rust, C++, Javascript, using QuickType.io generator. These parsers are based on latest JSON schema file (see below) and are super easy to keep updated. You can check existing APIs on the LDtk website.
JSON Schema: a schema file is now directly generated from source code (ie. a JSON that describes the LDtk project file format). It's available on LDtk.io/json and contains a schema following Draft 7 standard from Json-schema.org. This file describes all fields from LDtk json files (value types and descriptions). The great thing about JSON schema is that it allows JSON "parser" generation using QuickType. That's right: you can now generate Rust, C#, JS or Python parsers easily, right from the file format.
HaxeFlixel support: the HaxeFlixel game framework has been added to the official LDtk Haxe API. You can now easily load and display a LDtk project in your game.
Moving your mouse cursor over a Rule group in an auto-layer will now reveal all layer cells affected by the rules in this group.
If the auto-layer rule panel is open, moving your mouse over the level will now also highlight rules affecting the current coordinate.
The JSON documentation now shows clearly what parts are useful for game devs and what parts aren't (trying to make your dev life even easier!).
The app home now shows a list of recently opened folders along with recently opened project files.
Optimized the rule pattern editor to update less UI stuff when being edited.
Tiled TMX files are now exported in a sub folder (along with other optional external files, like levels or layer PNGs)
Better organized world panel (shortcut W
)
Better level name display in Linear world layouts.
Fixed reloading of tileset images.
Fixed Electron related security policy.
Fixed "Lost external enum file" dialog when loading a project.
Many UI tweaks
Bug fixes
Published by deepnight almost 4 years ago
String
field in an Entity. Any unmatched character in a string value will just be discarded. This allows the creation of custom field type (that needs to follow some specific pattern), while still having a safety net (the editor cleans up invalid parts).Published by deepnight almost 4 years ago
Published by deepnight almost 4 years ago
We now have an official Discord! Come join us, we have cookies 🤗 Feel free to share the invite URL: https://deepnight.net/go/ldtk-discord
Levels in your project can now be organized in various ways:
Just hit the W
or F2
key to switch to world view, and start re-arranging your creations as you wish! While in world mode, you can right click
to reveal a context menu.
F
key) are now animated and smoother.F
. Now pressing this key just fits the whole level in the viewport.<error>
).Published by deepnight almost 4 years ago
Published by deepnight almost 4 years ago
Published by deepnight almost 4 years ago
Level Designer Toolkit (LDtk) is now the new app name :) I hope you'll like it! The logo was updated, as well as source code, GitHub repo and various other things.
Because of the renaming, users of the Haxe API will have to run the following commands:
haxelib remove led-haxe-api
haxelib install ldtk-haxe-api
You might also need to manually uninstall any previous installation of LEd.
X
or Y
(or Z
). This also works from group of tiles.T
), and add details like cracks or vines over the same wall. Be careful though: erasing of stacked elements can be tricky, so you should use a mix of multiple layers and stacking to get the best results.*.ldtk
instead of *.json
. Therefore, on Windows, double-clicking such files will open the app accordingly. If you prefer the .json
extension, you can force it in each project settings (but will lose benefit of the file association).SHIFT
while clicking in a Tile layer, it will flood-fill the area using currently selected tiles (randomly, or by stamping group of tiles, depending on the current mode).SHIFT
+Right click
to erase a whole contiguous area.Escape
to close it.L
to load a saved tileset selection (using S
key)G
to toggle grid (which also implies "grid locking" in supported layer types).userSettings/
.pxOffsetX/Y
values. They should be added manually on display.autoLayerTiles
array.Published by deepnight about 4 years ago
Published by deepnight about 4 years ago
Experimental Ubuntu and MacOS versions (thanks to the community!)
Selections: you can now select any element in a level by using ALT
+ left click. You can move it around by holding left click. To select a rectangle area, use ALT
+ SHIFT
+ left click.
Duplicate: you can duplicate any element in the level by drag it with CTRL
+ALT
keys.
NOTE: For now, "undoing" a selection move or duplication will require multiple undos (one per affected layer). Undo/Redo features need a major rework, but this will only happen in a future update (see #151). Sorry for the inconvenience until this update!
Duplicate definitions: you can duplicate any Definition (layers, enums, entities etc.) by using the new context menu (right click or use "3-dots" buttons) in all panels.
Duplicate rules or rule groups: another much needed addition.
Multi-lines texts added to Entity custom field types.
Type conversions: Entity fields can now be converted to different types (like turning an Integer value to a Float, or into an Array). Some conversions might not be lossless.
Renamed the old Enhance active layer option to Single layer mode
Alt
+left click
now picks elements in all layers. If you have the Single layer mode activated (A
key), it will pick in current layer only.
Added an option to allow selection of empty spaces
Better mouse coordinates display in editor footer
Added rectangle selection size to editor footer
Use DELETE
key to delete selected elements
Use CTRL
+A
shortcut to select everything (limited to current layer in Single Layer Mode).
Optimized the JSON format to reduce its size (should be approximately 40-50% smaller).
Added the up-to-date JSON format doc to the app Home page.
Added fullscreen button to view Home changelogs
Pressing ENTER
on the Home screen now opens last edited map.
Side bar is now more compact
Better "Enum sync" window
Fixed "Enum value in use" detection
Removed duplicate sample map file
Fixed mouse wheel zoom limits
Fixed "color" field size in Entity instance editor when the value wasn't default.
Updated help window
Pressing Escape
key now leaves focused inputs first instead of closing panels.
Many bug fixes & minor enhancements
The JSON format was optimized to reduce its size (should be approximately 40-50% smaller). See changes below, or check the JSON_DOC.md.
layerInstance.autoTiles
layerInstance.autoLayerTiles
which is a more compact version of the tiles data generated by Auto-layer rules. It contains the following fields:
px: [x,y]
: an array of 2 values representing the level [x,y] pixel coordinates of the tile.src: [x,y]
: an array of 2 values representing the tileset [x,y] pixel coordinates of the tile.f
: a 2-bits integer to represent the mirror transformations of the tile: Bit 0 = X flip, Bit 1 = Y flipd
: this field contains internal data used by the Editor.entityInstance.x/y
entityInstance.__cx/__cy
entityInstance.px
: an array of 2 values representing [x,y] pixel coordinates of the entity.entityInstance.__grid
: an array of 2 values representing [cx,cy] grid-based coordinates of the entity.layerInstance.gridTiles
is now an array of:
px: [x,y]
: an array of 2 values representing the level [x,y] pixel coordinates of the tile.src: [x,y]
: an array of 2 values representing the tileset [x,y] pixel coordinates of the tile.f
: a 2-bits integer to represent the mirror transformations of the tile: Bit 0 = X flip, Bit 1 = Y flipd
: this field contains internal data used by the Editor.Published by deepnight about 4 years ago