8000 GitHub - jobf/ldtk-crush: crush your ldtk tilesheets
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

jobf/ldtk-crush

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is it

A tool for optimising png tilesheets in ltdk projects

Did you ever want to remove all duplicate tiles from a png without destroying your tilemaps in ldtk?

Me too, so I made this small script.

You tell it where the ldtk project is and which tilesheet to remove duplicates from. It will create a new tilesheet png and remap all the tiles to the new positions in all layers and levels where that tilesheet is used.

How to use it

Install with

haxelib git ldtk-crush https://github.com/jobf/ldtk-crush

Then run it as follows.

haxelib run ldtk-crush

It needs some arguments in order to process. These will be explained in the command line if missing. Below is a complete example.

Do not use absolute paths.

haxelib run ldtk-crush tests/resources/mapdata.ldtk Tilesheet outpath

Or if you want to determine the width of the resulting png you can specify it, for example 128 pixels.

haxelib run ldtk-crush tests/resources/mapdata.ldtk Tilesheet outpath 128

These arguments are in order

  • path-to-project (the path to the ldtk file to be processed)
  • tilesheet-identifier (the name of the tilesheet to be processed)
  • destination-directory (the directory to put the resulting files)
  • png-width, optional (the width in pixels of the resulting tilesheet png)

Caveat 5345 s

I've tested it with my most recent project and it's working nicely. However I put this together quickly over a couple of afternoons so there may be bugs. Please backup your input files before using it.

If you need changes or extra functionality please make an issue or pull request.

About

crush your ldtk tilesheets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0