kitbash 0.1.1

A modular 2D character assembly tool for game developers
kitbash-0.1.1 is not a library.

Kitbash

license

Current Status: 🚧 Early Development (Initial version in progress)

Kitbash — A modular 2D character assembly tool for game developers.

English Simplified Chinese
English 简体中文

Introduction

Kitbash is a specialized 2D asset compositing tool designed for game developers.
It solves the problem of assembling scattered sprite parts (like heads, bodies, weapons) into cohesive assets, allowing users to import, position, scale, and export them with pixel-perfect precision.

With Kitbash, you only need to drag and drop your assets, arrange them on the canvas, and export the result.
In the future, it may also support animation preview and spritesheet generation.

Features

  • Batch Import: Load multiple images at once (PNG, JPG, WEBP) via drag-and-drop or file dialog.
  • Pixel-Perfect Assembly: Nearest Neighbor Scaling ensures your pixel art remains crisp.
  • Interactive Canvas: Middle-mouse drag to pan, scroll to zoom, integer snapping for precision.
  • Layer Management: Visibility toggles, Z-Index reordering, and individual transform controls.
  • Advanced Export:
    • Export Scale: Output at 1x to 10x resolution.
    • Scattered ZIP Export: Downloads a .zip containing each layer as a separate, full-canvas-size PNG.
    • Metadata: Includes a data.json preserving original transform values.

How to Use

  1. Install Rust (if not already installed):

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    
  2. Clone the repository:

    git clone https://github.com/Bli-AIk/kitbash.git
    cd kitbash
    
  3. Run Locally (Native):

    cargo run --release
    
  4. Run Locally (Web/WASM): Install Trunk:

    cargo install --locked trunk
    rustup target add wasm32-unknown-unknown
    

    Start server:

    ./start_dev.sh
    # or
    trunk serve
    

    Open http://localhost:8080.

  5. Configuration: The UI panel provides settings for Canvas Size, Background Color, and Export Scale.

How to Build

Prerequisites

  • Rust 1.75 or later
  • wasm32-unknown-unknown target (for Web)

Build Steps

  1. Clone the repository:

    git clone https://github.com/Bli-AIk/kitbash.git
    cd kitbash
    
  2. Build (Native):

    cargo build --release
    
  3. Build (Web):

    trunk build --release
    

Dependencies

This project uses the following crates:

Crate Version Description
eframe 0.30 GUI framework (egui wrapper)
image 0.25 Image processing
zip 0.6 ZIP file generation
rfd 0.15 Native/Web file dialogs
wasm-bindgen 0.2 WASM JavaScript bindings

Contributing

Contributions are welcome! Whether you want to fix a bug, add a feature, or improve documentation:

  • Submit an Issue or Pull Request.
  • Share ideas and discuss design or architecture.

License

This project is licensed under either of

at your option.