Skip to content

skhoroshavin/pixel-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pixel-tools

This is a set of utilities useful for pixel art

A CLI tool for repacking and optimizing Tiled map files (*.tmx) and their associated tilesets. The tool analyzes tile usage in maps and creates optimized tilesets containing only the tiles that are actually used in the maps.

Features

  • Analyzes TMX map files to identify used tiles
  • Creates optimized tilesets by removing unused tiles
  • Preserves tile properties and object layers
  • Supports PNG image format for tilesets
  • Handles both embedded and external tilesets
  • Packs differently-sized object layer tiles into separate atlas
  • Outputs JSON tilemaps and sprite atlases that integrate seamlessly with phaser.io engine

Usage

repack <source-folder> <destination-folder>

This command will:

  1. Recursively scan all .tmx files in the source folder
  2. Generate optimized output in the destination folder:
    • JSON tilemaps and atlas mappings (compatible with Phaser.io engine)
    • Compressed PNG files with only used tiles and sprites

Example input and output structures:

source/
├── episode1/
│ ├── level1.tmx
│ └── level2.tmx
├── episode2/
│ └── level1.tmx
└── tilesets/
  ├── terrain.png
  └── trees.png

destination/
├── episode1/
│ ├── level1.tmj
│ ├── level1.png
│ ├── level1.atlas
│ ├── level2.tmj
│ ├── level2.png
│ └── level2.atlas
└── episode2/
  ├── level1.tmj
  ├── level1.png
  └── level1.atlas

A simple CLI tool for color conversion between images using a color lookup table (LUT). It has two main functions:

  1. Building a LUT by analyzing pairs of source and target images to learn color mappings
  2. Applying the LUT to convert new images from source to target color style

The tool was originally developed to convert Time Fantasy tilesets to match the SNES-style colors of Time Elements assets (both created by finalbossblues). However, it can be used for any image color conversion where you have example pairs showing the desired color mapping.

A pre-built LUT file is included for Time Fantasy to Time Elements conversion. Please see the example config file for details on all available options.

Terms of use

All tools are free to download and use for any purpose, including commercial projects. Full source code is available on GitHub under GPL3 license, which means you're also free to modify and redistribute these tools - the main restriction is that if (and only if) you're redistributing modified versions, you must also provide source code of your modifications to your customers.

About

This is a set of utilities useful for pixel art

Resources

License

Stars

Watchers

Forks

Packages

No packages published