Skip to main content

32Blit asset preparation and upload tools

Project description

32blit Tools

Build Status Coverage Status PyPi Package Python Versions

This tool is intended for use with the 32Blit console to prepare assets and upload games.

WORK IN PROGRESS

You should install from source using:

git clone https://github.com/pimoroni/32blit-tools
cd src/
python3 setup.py develop

Running

32blit --help

Packing Image Assets

All image assets are handled by Pillow so most image formats will work, be careful with lossy formats since they may add unwanted colours to your palette and leave you with oversized assets.

Supported formats:

  • 8bit PNG .png
  • 24bit PNG .png

Options:

  • palette - Image or palette file (Adobe .act, Pro Motion NG .pal, GIMP .gpl) containing the asset colour palette
  • transparent - Transparent colour (if palette isn't an RGBA image), should be either hex (FFFFFF) or R,G,B (255,255,255)
  • packed - (Defaults to true) will pack the output asset into bits depending on the palette size. A 16-colour palette would use 4-bits-per-pixel.
  • strict - Only allow colours that are present in the palette image/file

Packing Map Assets

Supported formats:

Packing Raw Assets

Supported formats:

  • CSV .csv
  • Binary .bin, .raw

Changelog

0.1.2

  • Flasher: Add list/del commands
  • Packer: Fix bug where asset packer shared class instances and state
  • Metadata: Find images when building from a config not in working directory
  • Metadata: Require only one of --file or --config options

0.1.1

  • Export metadata config to CMake
  • Add support for packing metadata splash to icns format for macOS

0.1.0

  • Fix palettes to support 256 colours (count will be 0)
  • Parse metadata and relocations with Construct
  • Breaking: Packed image format has changed!

0.0.9

  • Add support for PIC reloc'd binaries with RELO header
  • Add string arg support for asset filename to cmake tool

0.0.8

  • Add autoreset from game to firmware when running flash save
  • Add flash info to determine if in game or firmware
  • Add metadata dependency output from cmake tool
  • Fix asset dependency output to include additional files like palette
  • Redirect errors to stderr
  • Quiet! Use -vvvv for info, warnings, errors and debug information.

0.0.7

  • Add metadata tool - tags binary with metadata from a .yml file
  • Fix relative paths for packer palette files
  • Add support for subdirectories to 32blit flash save

0.0.6

  • Font tool (thanks @Daft-Freak)
  • Flash command with multi-target function (thanks @Daft-Freak)
  • Bugfixes to palette handling (thanks @Daft-Freak)
  • Bugfixes to package recognition (seemed to affect Python 3.8 on Windows)
  • Friendly (ish) error message when a .tmx tilemap with 0-index tiles is used (tmx is 1-indexed for valid tiles)

0.0.5

  • Output data length symbols (thanks @Daft-Freak)
  • Fix --packed to be default, again (packed can be disabled with --packed no)
  • Various other tweaks
  • Start of 32blit file upload support

0.0.4

  • Default images to packed (packed arg now takes a bool)
  • Fix bug in sprite payload size (thanks @Daft-Freak)

0.0.3

  • Fix packaging mishap so tool actually works

0.0.2

  • Real initial release
  • Pack, cmake and asset commands working
  • Very beta!

0.0.1

  • Initial Release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

32blit-0.1.2.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

32blit-0.1.2-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

Details for the file 32blit-0.1.2.tar.gz.

File metadata

  • Download URL: 32blit-0.1.2.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9

File hashes

Hashes for 32blit-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e421feb71d8786e72a6a440939e067dce06c65ea644da4721a454b057cfe3e2e
MD5 36e77f4885628fff155ee93fe82ccd8d
BLAKE2b-256 acaac64c4156dd71259521200e9fb2b00c9ab5eac1af0a9a567f47d5006da904

See more details on using hashes here.

File details

Details for the file 32blit-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: 32blit-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 26.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9

File hashes

Hashes for 32blit-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 932ab95b3b7cb07cd23737765b89f3624542dacf53f5d6eab0838dfe9b615227
MD5 c02f92d430adca615521e16aa4559d3d
BLAKE2b-256 ea626d7b240fecf337244d9489826054a997b4bf212bf88359dfd5785f741c79

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page