cute-asset-pipeline-docs

Cute Asset Pipeline

Fun Illustration of a computer

What is it?

Cute asset pipeline is an easy to use and automate way to change your PSD files directly to PNGs and a texture atlas. It additionally adds a way to package your assets and metadata about your assets with the same tool. Something other texture packing programs don’t easily support.

Supported Operating Systems

Cute Asset Pipeline should work on windows and MacOS.

Getting started

Requirements

Some knowledge of sql is currently required for inputting assets.

Asset Database

Cute Asset Pipeline uses an sqlite database to track assets. You can intialize a new one by running exporter init-db <db_name> this will create a file in your current directory with the name you passed as db_name. Cute Asset Pipeline currently doesn’t have a nice frontend for accessing you will either need to know how you write your own queries from your command line or download a GUI options like Sqlite Browser.

Asset Database Schema

The schema is fairly simple with a few core concepts.

Output File

The result of running the exporter will result in two files out.png and out.json. out.png is an image atlas containg all the defined game_assets. out.json contains definitions for all the game_assets and their position and size in the out.png. The name for the output files and path the output file is configurable in the Config

JSON file format

JSON file contains all the information related to exported assets and animations. Example file:

{
  "frames": [
    {
      "name": "exmaple",
      "tags": ["some", "tags"],
      "groupName": "parent",
      "x": 10,
      "y": 20,
      "width": 200,
      "height": 300,
      "animationId": 1,
      "frameNumber": 1,
      "animationName": "animation"
    },
    {
      "name": "exmaple",
      "tags": ["some", "tags"],
      "groupName": "parent",
      "x": 10,
      "y": 20,
      "width": 200,
      "height": 300,
      "animationId": null,
      "frameNumber": -1,
      "animationName": null
    }
  ],
  "animations": [
    {
      "name": "animation",
      "assets": [1]
    }
  ]
}

Config

You can configure the settings for exporting with either command line options or a config file. Config values:

Config File

By default Cute Asset Pipeline will look for a file name cute.ini in the directory it is being run from you can specify the name and path by passing --config <path to config>.

All values are optional. Format of the config file.

output-dir=output
output-name=files
asset-dir=that
cache-dir=something
padding=8

Command line options

The same options in the config file are available to be passed from the command line. Prefix the option with -- for the command line eg output-dir=this in the config file would be --output-dir this on the command line. Command line options override config file options.

Usage

These commands are run on the command line or terminal.

Creating intial asset db

cute_asset_pipeline init <db_file_name>

example: cute_asset_pipeline init cute.ini will create a db file in the current directory

Exporting assets

cute_asset_pipeline export

You can also pass command line options here or specify --config to specify a different path/name to the default cute.ini in the current directory.

examples: cute_asset_pipeline export --config assets/cute.ini cute_asset_pipeline export --asset-dir assets